From f5c36d19b636f01cc24417bc2b2f5b226ff3dd2c Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Sat, 31 Dec 2016 02:05:19 -0500 Subject: [PATCH] net: record bytes written before notifying the message processor --- src/net.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {