]> Git Repo - VerusCoin.git/commitdiff
When disconnecting a node, clear the received buffer so that we do
authorAlistair Buxton <[email protected]>
Sun, 18 Mar 2012 03:03:24 +0000 (03:03 +0000)
committerAlistair Buxton <[email protected]>
Sun, 18 Mar 2012 03:03:24 +0000 (03:03 +0000)
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.

src/net.cpp

index b22300e82f5ac361ef8594e67f1717989c359752..94ef7e7b3ab21cb452b52bb05b29cc91b1155678 100644 (file)
@@ -559,6 +559,7 @@ void CNode::CloseSocketDisconnect()
         printf("disconnecting node %s\n", addr.ToString().c_str());
         closesocket(hSocket);
         hSocket = INVALID_SOCKET;
+        vRecv.clear();
     }
 }
 
This page took 0.030212 seconds and 4 git commands to generate.