Skip to content

Commit 376b3c2

Browse files
committed
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
1 parent d7c58ad commit 376b3c2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/net.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,9 +1871,8 @@ void CConnman::ThreadMessageHandler()
18711871

18721872
// Send messages
18731873
{
1874-
TRY_LOCK(pnode->cs_sendProcessing, lockSend);
1875-
if (lockSend)
1876-
GetNodeSignals().SendMessages(pnode, *this, flagInterruptMsgProc);
1874+
LOCK(pnode->cs_sendProcessing);
1875+
GetNodeSignals().SendMessages(pnode, *this, flagInterruptMsgProc);
18771876
}
18781877
if (flagInterruptMsgProc)
18791878
return;

0 commit comments

Comments
 (0)