mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-21 05:53:09 +00:00
Dynamically scale bonded link monitor frequency according to aliveness
This commit is contained in:
parent
8148c658cf
commit
3ead6b67cd
@ -768,7 +768,7 @@ void Bond::processBackgroundBondTasks(void* tPtr, int64_t now)
|
||||
for (unsigned int i = 0; i < ZT_MAX_PEER_NETWORK_PATHS; ++i) {
|
||||
if (_paths[i].p && _paths[i].allowed()) {
|
||||
if (_isLeaf) {
|
||||
if ((_monitorInterval > 0) && (((now - _paths[i].p->_lastIn) >= _monitorInterval) /*|| ((now - _paths[i].p->_lastOut) >= _monitorInterval)*/)) {
|
||||
if ((_monitorInterval > 0) && (((now - _paths[i].p->_lastIn) >= (_paths[i].alive ? _monitorInterval : _failoverInterval)))) {
|
||||
if ((_peer->remoteVersionProtocol() >= 5) && (! ((_peer->remoteVersionMajor() == 1) && (_peer->remoteVersionMinor() == 1) && (_peer->remoteVersionRevision() == 0)))) {
|
||||
Packet outp(_peer->address(), RR->identity.address(), Packet::VERB_ECHO); // ECHO (this is our bond's heartbeat)
|
||||
outp.armor(_peer->key(), true, _peer->aesKeysIfSupported());
|
||||
|
Loading…
Reference in New Issue
Block a user