diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-06-09 08:13:11 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-06-09 08:13:14 +0200 |
commit | 1445835bd3c41ce17092dd9439f262fa29606d7c (patch) | |
tree | 0c3af1642a1f51891e90cb771d13eb2f99ff8279 | |
parent | d36618585de606d94c2a7a57bfa227ad1ab15517 (diff) | |
parent | d3d02d51453943bfe3a9edb944eb48f9f1e01aca (diff) |
Merge #8154: drop vAddrToSend after sending big addr message
d3d02d5 drop vAddrToSend after sending big addr message (Kaz Wesley)
-rw-r--r-- | src/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 72d9a3d441..6d006e8789 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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()); |