aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorCory Fields <[email protected]>2016-12-31 02:05:19 -0500
committerCory Fields <[email protected]>2017-01-12 23:05:09 -0500
commitf5c36d19b636f01cc24417bc2b2f5b226ff3dd2c (patch)
treec3b0cb11b71a23bd4440b0bafc2c657ec9b3565f /src/net.cpp
parentnet: handle message accounting in ReceiveMsgBytes (diff)
downloaddiscoin-f5c36d19b636f01cc24417bc2b2f5b226ff3dd2c.tar.xz
discoin-f5c36d19b636f01cc24417bc2b2f5b226ff3dd2c.zip
net: record bytes written before notifying the message processor
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 776047171..312a6e094 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1238,9 +1238,9 @@ void CConnman::ThreadSocketHandler()
bool notify = false;
if (!pnode->ReceiveMsgBytes(pchBuf, nBytes, notify))
pnode->CloseSocketDisconnect();
+ RecordBytesRecv(nBytes);
if(notify)
condMsgProc.notify_one();
- RecordBytesRecv(nBytes);
}
else if (nBytes == 0)
{