From b461c410bdb6ba09c57c6c1b5fd689c6539ba0a3 Mon Sep 17 00:00:00 2001 From: Luca Moser <moser.luca@gmail.com> Date: Mon, 29 Jun 2020 16:17:56 +0200 Subject: [PATCH] fix attempt log --- plugins/portcheck/plugin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/portcheck/plugin.go b/plugins/portcheck/plugin.go index 6bcf907e..fb1312bc 100644 --- a/plugins/portcheck/plugin.go +++ b/plugins/portcheck/plugin.go @@ -66,7 +66,7 @@ func checkAutopeeringConnection() { disc.Start(srv) defer disc.Close() - + const retryCount = 10 entryNodes := autopeering.Discovery().GetMasterPeers() for i := 0; i < retryCount; i++ { @@ -75,7 +75,7 @@ func checkAutopeeringConnection() { log.Infof("Pong received from %s", randEntryNode.IP()) break } - log.Warnf("Error pinging entry node %s (attempts left %d/%d): %s", randEntryNode.IP(), retryCount-i+1, retryCount, err) + log.Warnf("Error pinging entry node %s (attempts left %d): %s", randEntryNode.IP(), retryCount-i-1, retryCount, err) } if err != nil { -- GitLab