Remove SSH warning if no SSH settings set

This commit is contained in:
nicolas.dorier 2019-09-20 15:26:09 +09:00
parent a2cb6178b8
commit 3dada3c464
No known key found for this signature in database
GPG key ID: 6618763EF09186FE

View file

@ -63,15 +63,15 @@ namespace BTCPayServer.HostedServices
}
Logs.Configuration.LogWarning($"SSH connection issue of type {ex.GetType().Name}: {message}");
}
}
if (!canUseSSH)
{
Logs.Configuration.LogWarning($"Retrying SSH connection in {(int)nextWait.TotalSeconds} seconds");
await Task.Delay(nextWait, _cancellationTokenSource.Token);
nextWait = TimeSpan.FromSeconds(nextWait.TotalSeconds * 2);
if (nextWait > TimeSpan.FromMinutes(10.0))
nextWait = TimeSpan.FromMinutes(10.0);
goto retry;
if (!canUseSSH)
{
Logs.Configuration.LogWarning($"Retrying SSH connection in {(int)nextWait.TotalSeconds} seconds");
await Task.Delay(nextWait, _cancellationTokenSource.Token);
nextWait = TimeSpan.FromSeconds(nextWait.TotalSeconds * 2);
if (nextWait > TimeSpan.FromMinutes(10.0))
nextWait = TimeSpan.FromMinutes(10.0);
goto retry;
}
}
CanUseSSH = canUseSSH;
}