From 3dada3c46408b7fc8b688c7c855c86ef172f6b60 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Fri, 20 Sep 2019 15:26:09 +0900 Subject: [PATCH] Remove SSH warning if no SSH settings set --- .../CheckConfigurationHostedService.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/BTCPayServer/HostedServices/CheckConfigurationHostedService.cs b/BTCPayServer/HostedServices/CheckConfigurationHostedService.cs index e1c3e9574..e32b55a4f 100644 --- a/BTCPayServer/HostedServices/CheckConfigurationHostedService.cs +++ b/BTCPayServer/HostedServices/CheckConfigurationHostedService.cs @@ -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; }