mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
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.
This commit is contained in:
parent
0639aba42a
commit
30927cb530
1 changed files with 1 additions and 1 deletions
|
@ -434,7 +434,7 @@ public:
|
|||
//! Whether this peer is an inbound onion, i.e. connected via our Tor onion service.
|
||||
const bool m_inbound_onion;
|
||||
std::atomic<int> nVersion{0};
|
||||
RecursiveMutex m_subver_mutex;
|
||||
Mutex m_subver_mutex;
|
||||
/**
|
||||
* cleanSubVer is a sanitized string of the user agent byte array we read
|
||||
* from the wire. This cleaned string can safely be logged or displayed.
|
||||
|
|
Loading…
Add table
Reference in a new issue