Skip to content

Commit 1393ecc

Browse files
amcaseyJamesNK
andauthored
Add explanatory comment
Co-authored-by: James Newton-King <[email protected]>
1 parent 117003a commit 1393ecc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Servers/Kestrel/Core/src/Internal/Http3/Http3Connection.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,8 @@ internal WebTransportSession OpenNewWebTransportSession(Http3Stream http3Stream)
927927

928928
private Http3ErrorCode GetErrorCodeOrNoError()
929929
{
930-
return _errorCodeFeature.Error <= 0 ? Http3ErrorCode.NoError : (Http3ErrorCode)_errorCodeFeature.Error;
930+
// The default error value is -1. If it hasn't been changed before abort is called then default to HTTP/3's NoError value.
931+
return _errorCodeFeature.Error == -1 ? Http3ErrorCode.NoError : (Http3ErrorCode)_errorCodeFeature.Error;
931932
}
932933

933934
private static class GracefulCloseInitiator

0 commit comments

Comments
 (0)