diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-01-06 12:54:51 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-01-06 12:54:51 -0800 |
commit | 47ce52228b2400cdcfbd90d30b9536b013f6706a (patch) | |
tree | 5d504463de63e5c3c985ae5f4a4d020e9bef1765 /node/Peer.cpp | |
parent | 0a3ef38cade03c9b6a4f94611bd3df620ce1f4e6 (diff) | |
download | infinitytier-47ce52228b2400cdcfbd90d30b9536b013f6706a.tar.gz infinitytier-47ce52228b2400cdcfbd90d30b9536b013f6706a.zip |
Roots should probably not do this since it would likely be a waste of packets.
Diffstat (limited to 'node/Peer.cpp')
-rw-r--r-- | node/Peer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp index 1914da97..c00b07dc 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -512,7 +512,12 @@ bool Peer::_checkPath(Path &p,const uint64_t now) * counter is reset on any packet receive over this path. If it reaches the * MAX_PROBATION threshold the path is considred dead. */ - if ( (p.lastSend() > p.lastReceived()) && ((p.lastSend() - p.lastReceived()) >= ZT_PEER_DEAD_PATH_DETECTION_NO_ANSWER_TIMEOUT) && ((now - p.lastPing()) >= ZT_PEER_DEAD_PATH_DETECTION_NO_ANSWER_TIMEOUT) ) { + if ( + (p.lastSend() > p.lastReceived()) && + ((p.lastSend() - p.lastReceived()) >= ZT_PEER_DEAD_PATH_DETECTION_NO_ANSWER_TIMEOUT) && + ((now - p.lastPing()) >= ZT_PEER_DEAD_PATH_DETECTION_NO_ANSWER_TIMEOUT) && + (!RR->topology->amRoot()) + ) { TRACE("%s(%s) does not seem to be answering in a timely manner, checking if dead (probation == %u)",_id.address().toString().c_str(),p.address().toString().c_str(),p.probation()); if ( (_vProto >= 5) && ( !((_vMajor == 1)&&(_vMinor == 1)&&(_vRevision == 0)) ) ) { |