Browse Source

Fix condition where full HELLOs might not be sent when necessary (#1877)

Co-authored-by: Grant Limberg <[email protected]>
Joseph Henry 2 years ago
parent
commit
40705caf7e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      node/Peer.cpp

+ 3 - 1
node/Peer.cpp

@@ -530,7 +530,9 @@ unsigned int Peer::doPingAndKeepalive(void *tPtr,int64_t now)
 	performMultipathStateCheck(tPtr, now);
 	performMultipathStateCheck(tPtr, now);
 
 
 	const bool sendFullHello = ((now - _lastSentFullHello) >= ZT_PEER_PING_PERIOD);
 	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
 	// 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
 	// priority is used to track cluster redirections, meaning that when a cluster