Browse Source

Adjusted multipath constants

Joseph Henry 6 years ago
parent
commit
2593c6efee
2 changed files with 5 additions and 5 deletions
  1. 2 2
      node/Constants.hpp
  2. 3 3
      node/Peer.cpp

+ 2 - 2
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

+ 3 - 3
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<ZT_MAX_PEER_NETWORK_PATHS;++i) {
 		if (_paths[i].p) {