From 650a3ccc26983f692a26d69f397f36454eb1b4b7 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Fri, 21 Apr 2017 23:31:59 -0700 Subject: [PATCH] Pass exception to Complete (#1739) --- .../Internal/LibuvConnection.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 3c266d04e1..8637baf1ee 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv/Internal/LibuvConnection.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv/Internal/LibuvConnection.cs @@ -210,12 +210,12 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal { _socket.ReadStart(_allocCallback, _readCallback, this); } - catch (UvException) + catch (UvException ex) { // ReadStart() can throw a UvException in some cases (e.g. socket is no longer connected). // This should be treated the same as OnRead() seeing a "normalDone" condition. Log.ConnectionReadFin(ConnectionId); - Input.Complete(); + Input.Complete(new IOException(ex.Message, ex)); } } }