-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
HTTP3: Dispose HTTP3 connection when HttpClientHandler is disposed #56943
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue DetailsFixes #56785
|
Would this be only when there are no pending requests/responses or always? |
We do preserve HttpResponseStreams, but that's the responsibility of the Http3Connection to do it -- in other words, when you call Dispose on it, it will initiate client-based shutdown and close the connection when the outstanding requests are completed. Note HTTP2 works the same way -- we dispose all the HTTP2 connections, even though some may have in flight requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src update LGTM
Ok. So this will not automatically call QuicConnection.Dispose, right? (that would rest all the streams) |
Right. Http3Connection.Dispose marks the connection as shutting down, then calls CheckForShutdown, which does the drain logic I described above. |
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@geoffkizer Is this fixing #56766 ? Because the link description points to a PR not an issue and this looks like work on #56766. If so we should close that issue. |
Yes. Sorry, don't know how I ended up linking the wrong one. |
Fixes #56785