diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/Connection.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/Connection.cs index 3f61f8530..bdb1e016e 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/Connection.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/Connection.cs @@ -286,12 +286,22 @@ private void OnRead(UvStreamHandle handle, int status) void IConnectionControl.Pause() { + if (_socket.IsClosed) + { + return; + } + Log.ConnectionPause(ConnectionId); _socket.ReadStop(); } void IConnectionControl.Resume() { + if (_socket.IsClosed) + { + return; + } + Log.ConnectionResume(ConnectionId); try {