diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-02-08 10:03:01 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-02-08 10:03:01 -0800 |
commit | 63ec7e58d413aa4066764a9818c77c016cd9b8ff (patch) | |
tree | cee4a6e70f2747792d5bdbad1e7d19f47cdeb96c /node | |
parent | a963810e021c4e76d7f4e8958ff07a44eb07ed69 (diff) | |
download | infinitytier-63ec7e58d413aa4066764a9818c77c016cd9b8ff.tar.gz infinitytier-63ec7e58d413aa4066764a9818c77c016cd9b8ff.zip |
Make activity no longer a function of ping frequency, since this causes compatibility bugs when the latter was modified due to timer interactions with other versions.
Diffstat (limited to 'node')
-rw-r--r-- | node/Constants.hpp | 7 | ||||
-rw-r--r-- | node/Path.hpp | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/node/Constants.hpp b/node/Constants.hpp index 4d6c9d07..356260e6 100644 --- a/node/Constants.hpp +++ b/node/Constants.hpp @@ -260,7 +260,12 @@ /** * Timeout for overall peer activity (measured from last receive) */ -#define ZT_PEER_ACTIVITY_TIMEOUT ((ZT_PEER_DIRECT_PING_DELAY * 4) + ZT_PING_CHECK_INVERVAL) +#define ZT_PEER_ACTIVITY_TIMEOUT 500000 + +/** + * Timeout for path activity + */ +#define ZT_PATH_ACTIVITY_TIMEOUT ZT_PEER_ACTIVITY_TIMEOUT /** * No answer timeout to trigger dead path detection diff --git a/node/Path.hpp b/node/Path.hpp index 668728e0..be64f334 100644 --- a/node/Path.hpp +++ b/node/Path.hpp @@ -127,7 +127,7 @@ public: inline bool active(uint64_t now) const throw() { - return (((now - _lastReceived) < ZT_PEER_ACTIVITY_TIMEOUT)&&(_probation < ZT_PEER_DEAD_PATH_DETECTION_MAX_PROBATION)); + return (((now - _lastReceived) < ZT_PATH_ACTIVITY_TIMEOUT)&&(_probation < ZT_PEER_DEAD_PATH_DETECTION_MAX_PROBATION)); } /** |