From ba6e38b676e65cd78c2293446ee9a141392a0c19 Mon Sep 17 00:00:00 2001 From: Michael Boeckli Date: Mon, 22 Jul 2024 13:58:01 +0200 Subject: [PATCH] ARCO-105: Feedback --- peer.go | 4 ++-- peer_manager.go | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/peer.go b/peer.go index f259c11..550b174 100644 --- a/peer.go +++ b/peer.go @@ -40,8 +40,8 @@ const ( retryReadWriteMessageAttempts = 5 reconnectInterval = 10 * time.Second - pingIntervalDefault = 30 * time.Second - connectionHealthTickerDurationDefault = 1 * time.Minute + pingIntervalDefault = 2 * time.Minute + connectionHealthTickerDurationDefault = 3 * time.Minute ) type Block struct { diff --git a/peer_manager.go b/peer_manager.go index 03d3a7e..aeaf134 100644 --- a/peer_manager.go +++ b/peer_manager.go @@ -100,9 +100,7 @@ func (pm *PeerManager) StartMonitorPeerHealth() { for _, peer := range pm.peers { pm.waitGroup.Add(1) go func(p PeerI) { - defer func() { - pm.waitGroup.Done() - }() + defer pm.waitGroup.Done() for { select { case <-pm.ctx.Done():