mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
refactor: replace RecursiveMutex m_addr_fetches_mutex with Mutex
The RecursiveMutex m_addr_fetches_mutex is used at three places: - CConnman::AddAddrFetch() - CConnman::ProcessAddrFetch() - CConnman::ThreadOpenConnections() In each of the critical sections, only the the m_addr_fetches is accessed (and in the last case, also vAddedNodes), 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
d51d2a3bb5
commit
7d52ff5c38
1 changed files with 1 additions and 1 deletions
|
@ -1098,7 +1098,7 @@ private:
|
|||
bool fAddressesInitialized{false};
|
||||
AddrMan& addrman;
|
||||
std::deque<std::string> m_addr_fetches GUARDED_BY(m_addr_fetches_mutex);
|
||||
RecursiveMutex m_addr_fetches_mutex;
|
||||
Mutex m_addr_fetches_mutex;
|
||||
std::vector<std::string> m_added_nodes GUARDED_BY(m_added_nodes_mutex);
|
||||
mutable RecursiveMutex m_added_nodes_mutex;
|
||||
std::vector<CNode*> m_nodes GUARDED_BY(m_nodes_mutex);
|
||||
|
|
Loading…
Reference in a new issue