Replies: 2 comments
-
Or is this entirely handled by libc? |
Beta Was this translation helpful? Give feedback.
0 replies
-
See also https://utcc.utoronto.ca/~cks/space/blog/unix/AcceptErrnoProblem and https://stackoverflow.com/questions/76955978/which-socket-accept-errors-are-fatal . |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Examples such as
hello.rs
simply propagate any errors returned byaccept()
hyper/examples/hello.rs
Line 44 in 9c438e3
The Linux
accept(2)
man page states the following:This suggests that at least some return codes of accept should be ignored and accept should be called again. The Rust documentation on
TcpListener::accept
(either std or tokio) is quite scant. I have found discussions with no conclusions.Hyper v0.14 Server had some logic to differentiate accept Errors, but I believe this served a different purpose.
hyper/src/server/tcp.rs
Lines 279 to 286 in dedcb67
Is something like this correct or can it get stuck in a busy loop if something is wrong with the socket?
Does anyone have examples of Rust software where this is handled?
Beta Was this translation helpful? Give feedback.
All reactions