-
Notifications
You must be signed in to change notification settings - Fork 5.3k
add Http3LoopbackConnection.ShutdownAsync and use in AcceptConnectionAsync #58088
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
Conversation
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsContributes to #57779 Add a ShutdownAsync method on the HTTP3 loopback connection. This will send a GOAWAY frame to the client and wait for the client to close the connection gracefully. It will also eat connection abort exceptions if the client already has closed the connection. Use this method in AcceptConnectionAsync, after the user's connection handling code has finished. The intent here is to avoid the kind of data loss seen in #57779. and avoid HTTP3-specific one-offs to reenable tests as in #58041. Also, some fixes to GetAsync_CancelDuringResponseBodyReceived_Unbuffered_TaskCanceledQuickly to work properly with these changes and clean up some unnecessarily complicated logic.
|
|
/azp run runtime-libraries-coreclr outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
I ran this with the re-enabled test from #58041, it works nicely. I'd merge this and than I can merge my PR with just re-enabling the test. |
|
We have some failing mock tests: Seems relevant. EDIT: reproduces locally on the current main with this change. |
|
The failure in IncompleteResponseStream_ResponseDropped_CancelsRequestToServer seems to be caused by this: #58234 Since this test is not actually working as intended for HTTP3, I am going to disable it once again. |
708ae59 to
f553d82
Compare
|
I've pushed some changes that hopefully resolve all the issues. (1) Disable IncompleteResponseStream_ResponseDropped_CancelsRequestToServer again because it's actually testing what we want it to, and because this change causes it to fail again. More info: #58234 Please take a look. |
|
/azp run runtime-libraries-coreclr outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Even though I reverted the more complicated changes to GetAsync_CancelDuringResponseBodyReceived_Unbuffered_TaskCanceledQuickly, I think these are still worth doing in the long run. Tracked here: #58238 |
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Finalization.cs
Outdated
Show resolved
Hide resolved
…HandlerTest.Finalization.cs
|
/azp run runtime-libraries-coreclr outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/backport to release/6.0 |
|
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1180628641 |
Contributes to #57779
Add a ShutdownAsync method on the HTTP3 loopback connection. This will send a GOAWAY frame to the client and wait for the client to close the connection gracefully. It will also eat connection abort exceptions if the client already has closed the connection.
Use this method in AcceptConnectionAsync, after the user's connection handling code has finished. The intent here is to avoid the kind of data loss seen in #57779. and avoid HTTP3-specific one-offs to reenable tests as in #58041.
Also, some fixes to GetAsync_CancelDuringResponseBodyReceived_Unbuffered_TaskCanceledQuickly to work properly with these changes and clean up some unnecessarily complicated logic.
@ManickaP @CarnaViire