Skip to content

Commit

Permalink
Always decrement count on HTTP/2 stream completion (#3087)
Browse files Browse the repository at this point in the history
  • Loading branch information
halter73 authored Nov 9, 2018
1 parent 4d2e686 commit 5db6394
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Kestrel.Core/Internal/Http2/Http2Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1045,11 +1045,11 @@ void IHttp2StreamLifetimeHandler.OnStreamCompleted(int streamId)
{
lock (_stateLock)
{
_activeStreamCount--;

// Get, Add, Remove so the steam is always registered in at least one collection at a time.
if (_streams.TryGetValue(streamId, out var stream))
{
_activeStreamCount--;

if (stream.IsDraining)
{
stream.DrainExpiration =
Expand Down

0 comments on commit 5db6394

Please sign in to comment.