-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle ConnectionReset errors on windows UDP sockets #1448
Comments
That message shouldn't be printing in normal execution. It appears that the OS is telling s2n-quic that the UDP socket has been reset, which we currently consider as a fatal error and shut down the server. What platform are you on? Not sure what your stdin while loop is doing either. What happens if you remove that? |
I'm on Windows platform and stdin loop is just to keep the client side terminal running without terminating. Behavior is same even when the loop is not there. My original statement, "the server panics" could be wrong. Seems the error is coming from here . Looks like the event loop ends, error message is printed and the But the same errors are caught on the |
You're correct that the message is being printed on that line. When that line prints an error, it's considered fatal and will shut down the entire s2n-quic endpoint, which is why your application code isn't notified of the error. The source of the error is coming from the socket call in
ConnectionReset errors and basically just ignore them.
|
Update:
The behavior can be disabled but Tokio is also exposing the ICMP rejections and I confirmed from wireshark that the To circumvent for now, I did as you suggested, to filter out the conn reset error codes from breaking the event_loop. //in std.rs
fn connection_reset(&self) -> bool {
self.kind() == std::io::ErrorKind::ConnectionReset
}
//inside rx function
Err(err) if err.connection_reset() => {
break;
} Beyond this I had to either |
I believe the correct path forward is to disable this behavior, as it seems from the documentation that the socket becomes unusable after receiving the error? In terms of your fix, I don't think you want to
If you client is closing before the server is able to fully ACK the data, you need to block the client after you've connected to the server with |
Thanks. Incrementing the count is just working fine.
Mine is not this case as I'm sending ( Other thing I notice: Is this supposed to publish a |
I think I'm seeing this issue too, and judging by the comments or code I don't think it was actually fixed. |
No I don't think it was fixed |
Note: I'm a novice in both Rust and QUIC.
I'm attempting to open a send stream from QUIC server which periodically sends some data back to client which accepts the receive stream. However when the client is terminated (abruptly or neatly), server is not getting notification of the connection Error on the stream API. Instead
Server
panics withWhat's the right way to handle such errors?
Server side code:
Client side code:
The text was updated successfully, but these errors were encountered: