diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/InputFlowControl.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/InputFlowControl.cs index e3d57bad05071..beb43a2ea43c6 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/InputFlowControl.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/InputFlowControl.cs @@ -25,7 +25,7 @@ internal sealed class InputFlowControl private FlowControl _flow; private int _pendingUpdateSize; private bool _windowUpdatesDisabled; - private readonly Lock _flowLock = new(); + private readonly object _flowLock = new(); public InputFlowControl(uint initialWindowSize, uint minWindowSizeIncrement) { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs index 6b601fdcc7be4..d9fbe79bf4fb8 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs @@ -99,7 +99,7 @@ internal sealed class Http2FrameWriter private bool _completed; private bool _aborted; - private readonly Lock _windowUpdateLock = new(); + private readonly object _windowUpdateLock = new(); private long _connectionWindow; private readonly Queue _waitingForMoreConnectionWindow = new(); // This is the stream that consumed the last set of connection window