aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorAlistair Buxton <a.j.buxton@gmail.com>2012-03-18 03:03:24 +0000
committerAlistair Buxton <a.j.buxton@gmail.com>2012-03-18 03:03:24 +0000
commitbb13d056ea332030a3b960bf2756a36de77e05b8 (patch)
treef7557336fd4e2ccb0d6448609feef33ab02e7d68 /src/net.cpp
parent840f69c582b35391d38524e5216991836035d1db (diff)
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.
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp
index b22300e82f..94ef7e7b3a 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -559,6 +559,7 @@ void CNode::CloseSocketDisconnect()
printf("disconnecting node %s\n", addr.ToString().c_str());
closesocket(hSocket);
hSocket = INVALID_SOCKET;
+ vRecv.clear();
}
}