x.vweb, picoev: fix timeout event (#20377)

This commit is contained in:
Casper Küthe 2024-01-04 11:05:39 +01:00 committed by GitHub
parent 870e6189db
commit 7c310a1bd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 7 deletions

View file

@ -216,6 +216,12 @@ fn raw_callback(fd int, events int, context voidptr) {
$if trace_fd ? {
eprintln('timeout ${fd}')
}
if !isnil(pv.raw_cb) {
pv.raw_cb(mut pv, fd, events)
return
}
pv.close_conn(fd)
return
} else if events & picoev.picoev_read != 0 {