mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-07 13:03:45 +02:00
Fix (1) a deadlock bug and (2) a bug that prevented distributed rendezvous messages from being sent.
This commit is contained in:
parent
73e2c6e511
commit
47424df417
2 changed files with 3 additions and 1 deletions
|
@ -395,6 +395,7 @@ void Cluster::sendViaCluster(const Address &fromPeerAddress,const Address &toPee
|
||||||
mostRecentTs = rpe->second;
|
mostRecentTs = rpe->second;
|
||||||
mostRecentMemberId = rpe->first.second;
|
mostRecentMemberId = rpe->first.second;
|
||||||
}
|
}
|
||||||
|
++rpe;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -720,7 +720,8 @@ void Switch::_handleRemotePacketHead(const InetAddress &localAddr,const InetAddr
|
||||||
Mutex::Lock _l(_lastUniteAttempt_m);
|
Mutex::Lock _l(_lastUniteAttempt_m);
|
||||||
uint64_t &luts = _lastUniteAttempt[_LastUniteKey(source,destination)];
|
uint64_t &luts = _lastUniteAttempt[_LastUniteKey(source,destination)];
|
||||||
shouldUnite = ((now - luts) >= ZT_MIN_UNITE_INTERVAL);
|
shouldUnite = ((now - luts) >= ZT_MIN_UNITE_INTERVAL);
|
||||||
luts = now;
|
if (shouldUnite)
|
||||||
|
luts = now;
|
||||||
}
|
}
|
||||||
RR->cluster->sendViaCluster(source,destination,packet->data(),packet->size(),shouldUnite);
|
RR->cluster->sendViaCluster(source,destination,packet->data(),packet->size(),shouldUnite);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue