mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 06:21:44 +01:00
Catch all error thrown by EndAccept
This commit is contained in:
parent
70c80f4d44
commit
1c0d713b00
1 changed files with 9 additions and 2 deletions
|
@ -92,7 +92,7 @@ namespace BTCPayServer.HostedServices
|
|||
{
|
||||
clientSocket = ctx.ServerSocket.EndAccept(ar);
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
catch (Exception)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -111,7 +111,14 @@ namespace BTCPayServer.HostedServices
|
|||
CancellationToken = connectionCts.Token,
|
||||
CancellationTokenSource = connectionCts
|
||||
});
|
||||
ctx.ServerSocket.BeginAccept(Accept, ctx);
|
||||
try
|
||||
{
|
||||
ctx.ServerSocket.BeginAccept(Accept, ctx);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static void ConnectToSocks(IAsyncResult ar)
|
||||
|
|
Loading…
Add table
Reference in a new issue