picoev: handle EAGAIN or EWOULDBLOCK quietly (#21480)

This commit is contained in:
Rom 2024-05-10 01:19:20 -07:00 committed by GitHub
parent 81418b7fe5
commit 1eead82915
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -212,6 +212,10 @@ fn accept_callback(listen_fd int, events int, cb_arg voidptr) {
accepted_fd := accept(listen_fd)
if accepted_fd == -1 {
if fatal_socket_error(accepted_fd) == false {
return
}
eprintln('Error during accept')
return
}
@ -298,12 +302,12 @@ fn raw_callback(fd int, events int, context voidptr) {
pv.close_conn(fd)
return
} else if r == -1 {
eprintln('Error during req_read')
if fatal_socket_error(fd) == false {
return
}
eprintln('Error during req_read')
// fatal error
pv.close_conn(fd)
return