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)); } } }