Skip to content

Commit fa1f6f2

Browse files
author
MarcoFalke
committed
net: Send post-verack handshake messages at most once
1 parent ec0453c commit fa1f6f2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/net_processing.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2555,8 +2555,9 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat
25552555
// At this point, the outgoing message serialization version can't change.
25562556
const CNetMsgMaker msgMaker(pfrom.GetCommonVersion());
25572557

2558-
if (msg_type == NetMsgType::VERACK)
2559-
{
2558+
if (msg_type == NetMsgType::VERACK) {
2559+
if (pfrom.fSuccessfullyConnected) return;
2560+
25602561
if (!pfrom.IsInboundConn()) {
25612562
// Mark this node as currently connected, so we update its timestamp later.
25622563
LOCK(cs_main);

0 commit comments

Comments
 (0)