mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
net: Add a simple function for waking the message handler
This may be used publicly in the future
This commit is contained in:
parent
f5c36d19b6
commit
ef7b5ecbb7
10
src/net.cpp
10
src/net.cpp
@ -1239,8 +1239,8 @@ void CConnman::ThreadSocketHandler()
|
||||
if (!pnode->ReceiveMsgBytes(pchBuf, nBytes, notify))
|
||||
pnode->CloseSocketDisconnect();
|
||||
RecordBytesRecv(nBytes);
|
||||
if(notify)
|
||||
condMsgProc.notify_one();
|
||||
if (notify)
|
||||
WakeMessageHandler();
|
||||
}
|
||||
else if (nBytes == 0)
|
||||
{
|
||||
@ -1315,8 +1315,10 @@ void CConnman::ThreadSocketHandler()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CConnman::WakeMessageHandler()
|
||||
{
|
||||
condMsgProc.notify_one();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user