diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-09-07 11:13:17 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-09-07 11:13:17 -0700 |
commit | b5c86b6ba4112b23e46170fe241b4688532b493e (patch) | |
tree | 01d77467768c48efae59a5397eae119724bc4ceb /node/Constants.hpp | |
parent | f2d2df2b112c8a644b718abc521af296a83b5337 (diff) | |
download | infinitytier-b5c86b6ba4112b23e46170fe241b4688532b493e.tar.gz infinitytier-b5c86b6ba4112b23e46170fe241b4688532b493e.zip |
Bunch more path refactoring. Peers no longer forget paths, but do not normally use expired paths. Expired paths might still be tried if nothing else is reachable.
Diffstat (limited to 'node/Constants.hpp')
-rw-r--r-- | node/Constants.hpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/node/Constants.hpp b/node/Constants.hpp index ea4c434d..67e6fb58 100644 --- a/node/Constants.hpp +++ b/node/Constants.hpp @@ -244,17 +244,22 @@ * This is also how often pings will be retried to upstream peers (relays, roots) * constantly until something is heard. */ -#define ZT_PING_CHECK_INVERVAL 9000 +#define ZT_PING_CHECK_INVERVAL 10000 /** * How frequently to send heartbeats over in-use paths */ -#define ZT_PATH_HEARTBEAT_PERIOD 15000 +#define ZT_PATH_HEARTBEAT_PERIOD 10000 /** * Paths are considered inactive if they have not received traffic in this long */ -#define ZT_PATH_ALIVE_TIMEOUT 35000 +#define ZT_PATH_ALIVE_TIMEOUT 25000 + +/** + * Minimum time between attempts to check dead paths to see if they can be re-awakened + */ +#define ZT_PATH_MIN_REACTIVATE_INTERVAL 2500 /** * Delay between full-fledge pings of directly connected peers @@ -262,11 +267,16 @@ #define ZT_PEER_PING_PERIOD 60000 /** - * Peers forget paths that have not spoken in this long + * Paths are considered expired if they have not produced a real packet in this long */ #define ZT_PEER_PATH_EXPIRATION ((ZT_PEER_PING_PERIOD * 4) + 3000) /** + * How often to retry expired paths that we're still remembering + */ +#define ZT_PEER_EXPIRED_PATH_TRIAL_PERIOD (ZT_PEER_PING_PERIOD * 10) + +/** * Timeout for overall peer activity (measured from last receive) */ #define ZT_PEER_ACTIVITY_TIMEOUT 500000 |