Skip to content
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

HTTP/3: Abort connection on unexpected exception from AcceptStream #37432

Merged
merged 1 commit into from
Oct 11, 2021

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Oct 10, 2021

Addresses dotnet/runtime#60133

An unexpected error from QuicConnection.AcceptStreamAsync can put a Kestrel HTTP/3 connection into a bad state and make the connection run forever. The PR adds additional checks so that an unexpected error aborts the connection.

Can't unit test this because the known way to get into this state is the connection being closed without an abort, and QuicConnection always aborts on dispose.

System.Net.Quic is fixing the underlying cause of dotnet/runtime#60133. This PR independently fixes the issue happening as well. However, IMO both changes should also go into .NET 6. This PR acts as a safeguard against any other possible causes of this very bad situation.

@JamesNK JamesNK merged commit 974d6bc into main Oct 11, 2021
@JamesNK JamesNK deleted the jamesnk/acceptstream branch October 11, 2021 18:35
@ghost ghost added this to the 7.0-preview1 milestone Oct 11, 2021
@JamesNK
Copy link
Member Author

JamesNK commented Oct 11, 2021

/backport to release/6.0

@github-actions
Copy link
Contributor

Started backporting to release/6.0: https://github.com/dotnet/aspnetcore/actions/runs/1330312624

@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants