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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var connection = new Connection(this, acceptSocket);
|
try
|
||||||
connection.Start();
|
{
|
||||||
|
var connection = new Connection(this, acceptSocket);
|
||||||
|
connection.Start();
|
||||||
|
}
|
||||||
|
catch (UvException ex)
|
||||||
|
{
|
||||||
|
Log.LogError(0, ex, "ListenerSecondary.OnConnection");
|
||||||
|
acceptSocket.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http
|
||||||
{
|
{
|
||||||
Log.LogError(0, ex, "PipeListener.OnConnection");
|
Log.LogError(0, ex, "PipeListener.OnConnection");
|
||||||
acceptSocket.Dispose();
|
acceptSocket.Dispose();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http
|
||||||
{
|
{
|
||||||
Log.LogError(0, ex, "ListenerPrimary.OnConnection");
|
Log.LogError(0, ex, "ListenerPrimary.OnConnection");
|
||||||
acceptSocket.Dispose();
|
acceptSocket.Dispose();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http
|
||||||
{
|
{
|
||||||
Log.LogError(0, ex, "TcpListener.OnConnection");
|
Log.LogError(0, ex, "TcpListener.OnConnection");
|
||||||
acceptSocket.Dispose();
|
acceptSocket.Dispose();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,13 +48,11 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http
|
||||||
acceptSocket.NoDelay(ServerOptions.NoDelay);
|
acceptSocket.NoDelay(ServerOptions.NoDelay);
|
||||||
listenSocket.Accept(acceptSocket);
|
listenSocket.Accept(acceptSocket);
|
||||||
DispatchConnection(acceptSocket);
|
DispatchConnection(acceptSocket);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (UvException ex)
|
catch (UvException ex)
|
||||||
{
|
{
|
||||||
Log.LogError(0, ex, "TcpListenerPrimary.OnConnection");
|
Log.LogError(0, ex, "TcpListenerPrimary.OnConnection");
|
||||||
acceptSocket.Dispose();
|
acceptSocket.Dispose();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue