mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
When disconnecting a node, clear the received buffer so that we do
not process any already received messages. The primary reason to do this is if a node spams hundreds of messages and we ban them, we don't want to continue processing the rest of it.
This commit is contained in:
committed by
Luke Dashjr
parent
b6751ed1b2
commit
04dc79f1cc
@@ -716,6 +716,7 @@ void CNode::CloseSocketDisconnect()
|
||||
printf("disconnecting node %s\n", addr.ToString().c_str());
|
||||
closesocket(hSocket);
|
||||
hSocket = INVALID_SOCKET;
|
||||
vRecv.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user