[QUIC] QuicConnectionContext.Abort
calls connection shutdown with error code -1
#55196
Closed
1 task done
Labels
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
HTTP3
Is there an existing issue for this?
Describe the bug
When client connection idles out, the server tries to close the connection but without specifying error code, probably here:
aspnetcore/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Connection.cs
Line 534 in 7412c71
The implementation of error code feature defaults to -1 if it was not specified:
aspnetcore/src/Servers/Kestrel/Transport.Quic/src/Internal/QuicConnectionContext.FeatureCollection.cs
Line 18 in 7412c71
The allowed values are positive integers up to 62 bits. If the code passed in the
null
, QuicConnection.CloseAsync would use the default error code specified in connection options.This causes asserts in MsQuic library when build in Debug (in release it does nothing). We could add check in S.N.Quic, but that would break Kestrel at the moment.
Expected Behavior
Do not pass in -1 to
QuicConnection.CloseAsync
orQuicStream.Abort
. Rather pass innull
or any value between 0-2^62.Steps To Reproduce
Use debug build of MsQuic. Start the server, start the client, send H/3 request, read response, leave the client open until the connection idles out. Look for dump.
Exceptions (if any)
Dump stack:
.NET Version
9.0.100-preview.4.24177.8
Anything else?
No response
The text was updated successfully, but these errors were encountered: