simplify if
This commit is contained in:
@@ -491,8 +491,7 @@ bool Peer::_checkPath(Path &p,const uint64_t now)
|
|||||||
if (!p.active(now))
|
if (!p.active(now))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (p.lastSend() > p.lastReceived()) {
|
if ( (p.lastSend() > p.lastReceived()) && ((p.lastSend() - p.lastReceived()) >= ZT_PEER_DEAD_PATH_DETECTION_NO_ANSWER_TIMEOUT) ) {
|
||||||
if ((p.lastSend() - p.lastReceived()) >= ZT_PEER_DEAD_PATH_DETECTION_NO_ANSWER_TIMEOUT) {
|
|
||||||
TRACE("%s(%s) has not answered, checking if dead (probation: %u)",_id.address().toString().c_str(),p.address().toString().c_str(),p.probation());
|
TRACE("%s(%s) has not answered, 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)) ) ) {
|
if ( (_vProto >= 5) && ( !((_vMajor == 1)&&(_vMinor == 1)&&(_vRevision == 0)) ) ) {
|
||||||
@@ -507,7 +506,6 @@ bool Peer::_checkPath(Path &p,const uint64_t now)
|
|||||||
|
|
||||||
p.increaseProbation();
|
p.increaseProbation();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user