-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[H/3] Fix code passed into QuicConnection.CloseAsync and QuicStream.Abort #55282
Conversation
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.
I think it would be nice to flesh out the test a little, but I'm okay merging as-is if this unblocks you.
src/Servers/Kestrel/Transport.Quic/src/Internal/QuicConnectionContext.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/test/Interop.FunctionalTests/Http3/Http3RequestTests.cs
Outdated
Show resolved
Hide resolved
My new check is failing CI. The test fails for me locally, but not until after the log message check succeeds, so I'm not sure why that's happening. I'll investigate. Edit: it was flaky before my change. |
The windows failure is known CI flakiness |
Okay, looking more closely, the failure I'm seeing here is the same one I'm seeing locally and isn't related to the logging check. I think the test is flaky in that it won't reliably cause the connection to be closed on the server side. |
src/Servers/Kestrel/test/Interop.FunctionalTests/Http3/Http3RequestTests.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/Transport.Quic/src/Internal/QuicStreamContext.cs
Outdated
Show resolved
Hide resolved
I worked backwards from calls to `QuicConnection.CloseAsync` and `QuicStream.Abort`. TODO: Update tests
I believe the PR is ready to go. |
src/Servers/Kestrel/test/Interop.FunctionalTests/Http3/Http3RequestTests.cs
Outdated
Show resolved
Hide resolved
Ah, it was auto-merge from the previous design and my sign-off counts because it's technically Mana's PR. Well, shout if you don't like the exceptions @halter73. |
Fixes the code passed into
QuicConnection.CloseAsync
andQuicStream.Abort
which was by default -1. Quic supports only error codes up to 62 bits non-negative integer values: https://www.rfc-editor.org/rfc/rfc9000.html#integer-encoding.Also added test which crashes the process (if running with DEBUG build of MsQuic) before this change and runs to completion afterwards.
Let me know if you want me to shuffle the code around, I'm not much familiar with the structure of your code base.
cc @amcasey
Fixes #55196
Also this will be followed up in S.N.Quic with some checks (dotnet/runtime#101385).