From a97c08843c620171b8ca781fd1d7fe8b7af0ac4a Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Mon, 12 Jun 2017 11:12:01 -0700 Subject: [PATCH] Complete IPipeWriter in OutputProducer.Abort() (#1894) - This prevents MemoryPoolBlocks from leaking when writes fail --- .../Internal/Http/OutputProducer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/OutputProducer.cs b/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/OutputProducer.cs index 560c4440cc..5f58ef6ae4 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/OutputProducer.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/OutputProducer.cs @@ -95,6 +95,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http _log.ConnectionDisconnect(_connectionId); _completed = true; _pipe.Reader.CancelPendingRead(); + _pipe.Writer.Complete(); } }