diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs index 2f575865930b..7b6c3b025789 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs @@ -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();