mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
picoev: handle EAGAIN
or EWOULDBLOCK
quietly (#21480)
This commit is contained in:
parent
81418b7fe5
commit
1eead82915
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue