diff --git a/node/Constants.hpp b/node/Constants.hpp index 010b69684..3f95ac29c 100644 --- a/node/Constants.hpp +++ b/node/Constants.hpp @@ -401,7 +401,7 @@ /** * How often an aggregate link statistics report is emitted into this tracing system */ -#define ZT_PATH_AGGREGATE_STATS_REPORT_INTERVAL 60000 +#define ZT_PATH_AGGREGATE_STATS_REPORT_INTERVAL 30000 /** * How much an aggregate link's component paths can vary from their target allocation @@ -467,7 +467,7 @@ * by default to avoid increasing idle bandwidth use for regular * links. */ -#define ZT_MULTIPATH_PEER_PING_PERIOD 5000 +#define ZT_MULTIPATH_PEER_PING_PERIOD (ZT_PEER_PING_PERIOD / 10) /** * Paths are considered expired if they have not sent us a real packet in this long diff --git a/node/Peer.cpp b/node/Peer.cpp index c1bfc1707..2bba9bd9b 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -782,9 +782,6 @@ unsigned int Peer::doPingAndKeepalive(void *tPtr,int64_t now) unsigned int sent = 0; Mutex::Lock _l(_paths_m); - const bool sendFullHello = ((now - _lastSentFullHello) >= ZT_PEER_PING_PERIOD); - _lastSentFullHello = now; - processBackgroundPeerTasks(now); // Emit traces regarding aggregate link status @@ -815,6 +812,9 @@ unsigned int Peer::doPingAndKeepalive(void *tPtr,int64_t now) else break; } + const bool sendFullHello = ((now - _lastSentFullHello) >= ZT_PEER_PING_PERIOD); + _lastSentFullHello = now; + unsigned int j = 0; for(unsigned int i=0;i