diff options
author | Matt Corallo <git@bluematt.me> | 2017-01-12 20:08:52 -0800 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2017-01-13 10:34:38 -0800 |
commit | 376b3c2c6e329357e4793c1d1b90d1dc0f30fed0 (patch) | |
tree | c132086211bc65e2d4d74b1ca89245745086724c | |
parent | d7c58ad514ee00db00589216166808258bc16b60 (diff) |
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
-rw-r--r-- | src/net.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/net.cpp b/src/net.cpp index e7b4562eab..1019d59544 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -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; |