File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
src/Servers/Kestrel/Core/src/Internal/Http2 Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ internal sealed class Http2FrameWriter
9999 private bool _completed ;
100100 private bool _aborted ;
101101
102- private readonly object _windowUpdateLock = new ( ) ;
102+ private readonly Lock _windowUpdateLock = new ( ) ;
103103 private long _connectionWindow ;
104104 private readonly Queue < Http2OutputProducer > _waitingForMoreConnectionWindow = new ( ) ;
105105 // This is the stream that consumed the last set of connection window
Original file line number Diff line number Diff line change @@ -630,14 +630,9 @@ public void DecrementActiveClientStreamCount()
630630 {
631631 // Decrement can be called twice, via calling CompleteAsync and then Abort on the HttpContext.
632632 // Only decrement once total.
633- lock ( _completionLock )
633+ if ( Interlocked . CompareExchange ( ref _decrementCalled , true , false ) )
634634 {
635- if ( _decrementCalled )
636- {
637- return ;
638- }
639-
640- _decrementCalled = true ;
635+ return ;
641636 }
642637
643638 _context . StreamLifetimeHandler . DecrementActiveClientStreamCount ( ) ;
You can’t perform that action at this time.
0 commit comments