From 0fd885e5ebbffab28de9fe5f583a6f381725521f Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 8 Apr 2017 01:22:06 -0700 Subject: [PATCH] Signal the reader after aborting the connection (#1636) - This will give it a chance to unwind gracefully before failing with an invalid request. Fixes #1632 --- .../Internal/LibuvConnection.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv/Internal/LibuvConnection.cs b/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv/Internal/LibuvConnection.cs index 53c5f48dcc..d0a5563de1 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv/Internal/LibuvConnection.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv/Internal/LibuvConnection.cs @@ -217,8 +217,10 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal if (!normalRead) { - Input.Complete(error); var ignore = AbortAsync(error); + + // Complete after aborting the connection + Input.Complete(error); } }