diff --git a/src/Microsoft.AspNet.Server.Kestrel/Http/Frame.cs b/src/Microsoft.AspNet.Server.Kestrel/Http/Frame.cs index 8156706197..3922f4d9d7 100644 --- a/src/Microsoft.AspNet.Server.Kestrel/Http/Frame.cs +++ b/src/Microsoft.AspNet.Server.Kestrel/Http/Frame.cs @@ -199,7 +199,15 @@ namespace Microsoft.AspNet.Server.Kestrel.Http ConnectionControl.End(ProduceEndType.SocketDisconnect); SocketInput.AbortAwaiting(); - _abortedCts?.Cancel(); + try + { + _abortedCts?.Cancel(); + } + catch (ObjectDisposedException) + { + // Don't log ODEs thrown from _abortedCts.Cancel() + // If _abortedCts is disposed, the app has already completed. + } } catch (Exception ex) {