git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
b6751ed
)
When disconnecting a node, clear the received buffer so that we do
author
Alistair Buxton
<a.j.buxton@gmail.com>
Sun, 18 Mar 2012 03:03:24 +0000 (
03:03
+0000)
committer
Luke Dashjr
<luke-jr+git@utopios.org>
Thu, 22 Mar 2012 20:19:26 +0000 (16:19 -0400)
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
patch
|
blob
|
history
diff --git
a/src/net.cpp
b/src/net.cpp
index
a8d3d0b
..
763e160
100644
(file)
--- a/
src/net.cpp
+++ b/
src/net.cpp
@@
-716,6
+716,7
@@
void CNode::CloseSocketDisconnect()
printf("disconnecting node %s\n", addr.ToString().c_str());
closesocket(hSocket);
hSocket = INVALID_SOCKET;
+ vRecv.clear();
}
}