Handle exceptions thrown from Connection.Start in ListenerSecondary
- This is already done for primary listeners
This commit is contained in:
parent
8dbdc0294f
commit
b4632c273e
|
|
@ -138,8 +138,16 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http
|
|||
return;
|
||||
}
|
||||
|
||||
var connection = new Connection(this, acceptSocket);
|
||||
connection.Start();
|
||||
try
|
||||
{
|
||||
var connection = new Connection(this, acceptSocket);
|
||||
connection.Start();
|
||||
}
|
||||
catch (UvException ex)
|
||||
{
|
||||
Log.LogError(0, ex, "ListenerSecondary.OnConnection");
|
||||
acceptSocket.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http
|
|||
{
|
||||
Log.LogError(0, ex, "PipeListener.OnConnection");
|
||||
acceptSocket.Dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http
|
|||
{
|
||||
Log.LogError(0, ex, "ListenerPrimary.OnConnection");
|
||||
acceptSocket.Dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http
|
|||
{
|
||||
Log.LogError(0, ex, "TcpListener.OnConnection");
|
||||
acceptSocket.Dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,13 +48,11 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http
|
|||
acceptSocket.NoDelay(ServerOptions.NoDelay);
|
||||
listenSocket.Accept(acceptSocket);
|
||||
DispatchConnection(acceptSocket);
|
||||
|
||||
}
|
||||
catch (UvException ex)
|
||||
{
|
||||
Log.LogError(0, ex, "TcpListenerPrimary.OnConnection");
|
||||
acceptSocket.Dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue