From 40705caf7eb1aa9689458e553fbccc720bfa0d95 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Mon, 6 Mar 2023 10:24:34 -0800 Subject: [PATCH] Fix condition where full HELLOs might not be sent when necessary (#1877) Co-authored-by: Grant Limberg --- node/Peer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node/Peer.cpp b/node/Peer.cpp index 62798e63c..28351c28d 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -530,7 +530,9 @@ unsigned int Peer::doPingAndKeepalive(void *tPtr,int64_t now) performMultipathStateCheck(tPtr, now); const bool sendFullHello = ((now - _lastSentFullHello) >= ZT_PEER_PING_PERIOD); - _lastSentFullHello = now; + if (sendFullHello) { + _lastSentFullHello = now; + } // Right now we only keep pinging links that have the maximum priority. The // priority is used to track cluster redirections, meaning that when a cluster