Make sure renci ssh does not prevent btcpay from closing

This commit is contained in:
nicolas.dorier 2019-10-26 23:40:35 +09:00
parent 9a99b3fdc2
commit cd5b334a00
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE

View File

@ -81,7 +81,8 @@ namespace BTCPayServer.HostedServices
_cancellationTokenSource.Cancel();
try
{
await _testingConnection;
// Renci SSH sometimes is deadlocking, so we just wait at most 5 seconds
await Task.WhenAny(_testingConnection, Task.Delay(5000, _cancellationTokenSource.Token));
}
catch { }
Logs.PayServer.LogInformation($"{this.GetType().Name} successfully exited...");