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
[QUIC] QuicStream.ReadAsync against an aborted connection returns End Of Stream #32050
Comments
@nibanks, when closing a connection in quic with a non-zero error code, does that propagate up to streams at all? Right now it looks like in msquic, an event occurs on the connection with an error code, but that doesn't propagate up to the streams; streams just close. |
@jkotalik nope. Streams and connections have separate error code spaces. If you shutdown the connection with an error, the peer streams just get shutdown complete events, and the connection gets the peer shutdown with the error code. |
Hm, interesting. So if the peer shuts down a connection, are streams gracefully or abortively shut down? To me, if we just get shutdown/ shutdown complete events, it seems graceful even though we are "aborting" the connection. |
As far as QUIC is concerned, there is no such thing as "aborting" a connection. The app shuts it down with an error code. There are no "good" or "bad" error codes. When you shut down a connection with currently opened streams, the streams are implicitly shutdown, but since no app-specific error code was given to shut down the stream by the peer, none is delivered to the app. They are just implicitly shut down, and the corresponding events are delivered to the app. |
Meeting notes:
|
This leverages newly added flag to SHUTDOWN_COMPLETED event, which means that's not a user-initiated stream shutdown, but a connection abort. Fixes #32050
ReadAsync() will return 0, which indicates end of stream, when a connection was aborted. It should be throwing
QuicConnectionAbortedException
.The text was updated successfully, but these errors were encountered: