mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
Catch all error thrown by EndAccept
This commit is contained in:
parent
70c80f4d44
commit
1c0d713b00
@ -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…
Reference in New Issue
Block a user