Browse Source

Make the cs_sendProcessing a LOCK instead of a TRY_LOCK

Technically cs_sendProcessing is entirely useless now because it
is only ever taken on the one MessageHandler thread, but because
there may be multiple of those in the future, it is left in place
0.14
Matt Corallo 8 years ago
parent
commit
376b3c2c6e
  1. 5
      src/net.cpp

5
src/net.cpp

@ -1871,9 +1871,8 @@ void CConnman::ThreadMessageHandler() @@ -1871,9 +1871,8 @@ void CConnman::ThreadMessageHandler()
// Send messages
{
TRY_LOCK(pnode->cs_sendProcessing, lockSend);
if (lockSend)
GetNodeSignals().SendMessages(pnode, *this, flagInterruptMsgProc);
LOCK(pnode->cs_sendProcessing);
GetNodeSignals().SendMessages(pnode, *this, flagInterruptMsgProc);
}
if (flagInterruptMsgProc)
return;

Loading…
Cancel
Save