Skip to content

Commit

Permalink
Merge pull request #121 from kaistshadow/issue/120
Browse files Browse the repository at this point in the history
issue #120 관련. yg-amazon-exp branch 정리를 위한 cherry-picking
  • Loading branch information
ygnkim authored Jan 9, 2021
2 parents e05f597 + c098a24 commit 9ae9712
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions BLEEPlib/src/mainmodules/EstimateRTTModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,10 @@ bool EstimateRTTModule::MulticastMessage(std::shared_ptr<Message> message) {
int sentOut = 0;
for (int i : idxs) {
if (message->GetSource().GetId() != dests[i].GetId() && sentOut < fanOut) {
// check whether there exists a data socket for the destination peer
if (!peerManager.HasEstablishedDataSocket(dests[i]))
continue;

// get datasocket
int socketFD = peerManager.GetConnectedSocketFD(dests[i]);
std::shared_ptr<RTTModule_DataSocket> dataSocket = socketManager.GetDataSocket(socketFD);
Expand Down Expand Up @@ -667,6 +671,10 @@ bool EstimateRTTModule::ForwardMessage(std::shared_ptr<RTTModule_MessageHeader>
int sentOut = 0;
for (int i : idxs) {
if (message->GetSource().GetId() != dests[i].GetId() && sentOut < fanOut){
// check whether there exists a data socket for the destination peer
if (!peerManager.HasEstablishedDataSocket(dests[i]))
continue;

// get datasocket
int socketFD = peerManager.GetConnectedSocketFD(dests[i]);
std::shared_ptr<RTTModule_DataSocket> dataSocket = socketManager.GetDataSocket(socketFD);
Expand Down

0 comments on commit 9ae9712

Please sign in to comment.