Skip to content

Commit 30927cb

Browse files
committed
refactor: replace RecursiveMutex m_subver_mutex with Mutex
In each of the critical sections, only the the guarded variable is accessed, without any chance that within one section another one is called. Hence, we can use an ordinary Mutex instead of RecursiveMutex.
1 parent 0639aba commit 30927cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ class CNode
434434
//! Whether this peer is an inbound onion, i.e. connected via our Tor onion service.
435435
const bool m_inbound_onion;
436436
std::atomic<int> nVersion{0};
437-
RecursiveMutex m_subver_mutex;
437+
Mutex m_subver_mutex;
438438
/**
439439
* cleanSubVer is a sanitized string of the user agent byte array we read
440440
* from the wire. This cleaned string can safely be logged or displayed.

0 commit comments

Comments
 (0)