aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-06-09 08:13:11 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-06-09 08:13:14 +0200
commit1445835bd3c41ce17092dd9439f262fa29606d7c (patch)
tree0c3af1642a1f51891e90cb771d13eb2f99ff8279 /src
parentd36618585de606d94c2a7a57bfa227ad1ab15517 (diff)
parentd3d02d51453943bfe3a9edb944eb48f9f1e01aca (diff)
Merge #8154: drop vAddrToSend after sending big addr message
d3d02d5 drop vAddrToSend after sending big addr message (Kaz Wesley)
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp3
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());