diff options
| author | Matt Corallo <[email protected]> | 2017-01-12 20:08:52 -0800 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2017-01-13 10:34:38 -0800 |
| commit | 376b3c2c6e329357e4793c1d1b90d1dc0f30fed0 (patch) | |
| tree | c132086211bc65e2d4d74b1ca89245745086724c /src/net.cpp | |
| parent | Split CNode::cs_vSend: message processing and message sending (diff) | |
| download | discoin-376b3c2c6e329357e4793c1d1b90d1dc0f30fed0.tar.xz discoin-376b3c2c6e329357e4793c1d1b90d1dc0f30fed0.zip | |
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
Diffstat (limited to 'src/net.cpp')
| -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 e7b4562ea..1019d5954 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; |