Skip to content

Commit

Permalink
Merge #8154: drop vAddrToSend after sending big addr message
Browse files Browse the repository at this point in the history
d3d02d5 drop vAddrToSend after sending big addr message (Kaz Wesley)
  • Loading branch information
laanwj committed Jun 9, 2016
2 parents d366185 + d3d02d5 commit 1445835
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.cpp
Expand Up @@ -5725,6 +5725,9 @@ bool SendMessages(CNode* pto)
pto->vAddrToSend.clear();
if (!vAddr.empty())
pto->PushMessage(NetMsgType::ADDR, vAddr);
// we only send the big addr message once
if (pto->vAddrToSend.capacity() > 40)
pto->vAddrToSend.shrink_to_fit();
}

CNodeState &state = *State(pto->GetId());
Expand Down

0 comments on commit 1445835

Please sign in to comment.