mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-26 07:26:15 +01:00
Make resetting implicit in TransportDeserializer::Read()
This commit is contained in:
committed by
Jonas Schnelli
parent
6a91499496
commit
f342a5e61a
@@ -572,10 +572,7 @@ bool CNode::ReceiveMsgBytes(const char *pch, unsigned int nBytes, bool& complete
|
||||
while (nBytes > 0) {
|
||||
// absorb network data
|
||||
int handled = m_deserializer->Read(pch, nBytes);
|
||||
if (handled < 0) {
|
||||
m_deserializer->Reset();
|
||||
return false;
|
||||
}
|
||||
if (handled < 0) return false;
|
||||
|
||||
pch += handled;
|
||||
nBytes -= handled;
|
||||
|
||||
Reference in New Issue
Block a user