You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we try to downgrade an HTTP/2 connection to HTTP/1.1 and we're already at the connection limit, we'll throw away the new connection.
When doing so, we'll set canUse to false and dispose the stream.
But then we'll still try to construct an HTTP/1.1 stream out of it and eventually handle its failure, which will lead us to decrement the _associatedHttp11ConnectionCount and _pendingHttp11ConnectionCount counters that we never incremented for this connection in the first place, leaving them off by 1.
Noticed this one while cleaning up #99364
If we try to downgrade an HTTP/2 connection to HTTP/1.1 and we're already at the connection limit, we'll throw away the new connection.
When doing so, we'll set
canUse
to false and dispose the stream.But then we'll still try to construct an HTTP/1.1 stream out of it and eventually handle its failure, which will lead us to decrement the
_associatedHttp11ConnectionCount
and_pendingHttp11ConnectionCount
counters that we never incremented for this connection in the first place, leaving them off by 1.It looks like we're just missing a
return
here.runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs
Lines 654 to 658 in 4e86b1c
The text was updated successfully, but these errors were encountered: