Pass exception to Complete (#1739)

This commit is contained in:
David Fowler 2017-04-21 23:31:59 -07:00 committed by GitHub
parent a749939be4
commit 650a3ccc26
1 changed files with 2 additions and 2 deletions

View File

@ -210,12 +210,12 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal
{ {
_socket.ReadStart(_allocCallback, _readCallback, this); _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). // 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. // This should be treated the same as OnRead() seeing a "normalDone" condition.
Log.ConnectionReadFin(ConnectionId); Log.ConnectionReadFin(ConnectionId);
Input.Complete(); Input.Complete(new IOException(ex.Message, ex));
} }
} }
} }