Browse Source

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.
miguelfreitas
Alistair Buxton 13 years ago
parent
commit
bb13d056ea
  1. 1
      src/net.cpp

1
src/net.cpp

@ -559,6 +559,7 @@ void CNode::CloseSocketDisconnect() @@ -559,6 +559,7 @@ void CNode::CloseSocketDisconnect()
printf("disconnecting node %s\n", addr.ToString().c_str());
closesocket(hSocket);
hSocket = INVALID_SOCKET;
vRecv.clear();
}
}

Loading…
Cancel
Save