Skip to content

Commit

Permalink
Reuse HttpProtocol CTS (#31466)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennanConroy authored Apr 3, 2021
1 parent d33567d commit 8d721cf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,11 @@ public void Reset()
lock (_abortLock)
{
_preventRequestAbortedCancellation = false;
localAbortCts = _abortedCts;
_abortedCts = null;
if (_abortedCts?.TryReset() == false)
{
localAbortCts = _abortedCts;
_abortedCts = null;
}
}

localAbortCts?.Dispose();
Expand Down

0 comments on commit 8d721cf

Please sign in to comment.