diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2022-01-16 02:14:12 +0100 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2022-01-16 16:49:13 +0100 |
commit | 30927cb5306d01da2716786c2d9457c49ec49d0f (patch) | |
tree | f4d20e5a215a05b4d264d8e0de5ac715f37c0f7e | |
parent | 0639aba42ad8449fe43eb2aad0ffbe3390aabd37 (diff) | |
download | bitcoin-30927cb5306d01da2716786c2d9457c49ec49d0f.tar.xz |
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.
-rw-r--r-- | src/net.h | 2 |
1 files changed, 1 insertions, 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. |