Browse Source

net: Add a simple function for waking the message handler

This may be used publicly in the future
0.14
Cory Fields 8 years ago
parent
commit
ef7b5ecbb7
  1. 8
      src/net.cpp
  2. 2
      src/net.h

8
src/net.cpp

@ -1240,7 +1240,7 @@ void CConnman::ThreadSocketHandler() @@ -1240,7 +1240,7 @@ void CConnman::ThreadSocketHandler()
pnode->CloseSocketDisconnect();
RecordBytesRecv(nBytes);
if (notify)
condMsgProc.notify_one();
WakeMessageHandler();
}
else if (nBytes == 0)
{
@ -1315,8 +1315,10 @@ void CConnman::ThreadSocketHandler() @@ -1315,8 +1315,10 @@ void CConnman::ThreadSocketHandler()
}
}
void CConnman::WakeMessageHandler()
{
condMsgProc.notify_one();
}

2
src/net.h

@ -341,6 +341,8 @@ private: @@ -341,6 +341,8 @@ private:
void ThreadSocketHandler();
void ThreadDNSAddressSeed();
void WakeMessageHandler();
uint64_t CalculateKeyedNetGroup(const CAddress& ad);
CNode* FindNode(const CNetAddr& ip);

Loading…
Cancel
Save