Fix (1) a deadlock bug and (2) a bug that prevented distributed rendezvous messages from being sent.

This commit is contained in:
Adam Ierymenko 2015-11-09 13:39:06 -08:00
parent 73e2c6e511
commit 47424df417
2 changed files with 3 additions and 1 deletions

View File

@ -395,6 +395,7 @@ void Cluster::sendViaCluster(const Address &fromPeerAddress,const Address &toPee
mostRecentTs = rpe->second;
mostRecentMemberId = rpe->first.second;
}
++rpe;
}
}

View File

@ -720,7 +720,8 @@ void Switch::_handleRemotePacketHead(const InetAddress &localAddr,const InetAddr
Mutex::Lock _l(_lastUniteAttempt_m);
uint64_t &luts = _lastUniteAttempt[_LastUniteKey(source,destination)];
shouldUnite = ((now - luts) >= ZT_MIN_UNITE_INTERVAL);
luts = now;
if (shouldUnite)
luts = now;
}
RR->cluster->sendViaCluster(source,destination,packet->data(),packet->size(),shouldUnite);
return;