diff --git a/libp2p/NodeTable.cpp b/libp2p/NodeTable.cpp index 772ba6147..c3215da71 100644 --- a/libp2p/NodeTable.cpp +++ b/libp2p/NodeTable.cpp @@ -576,8 +576,8 @@ void NodeTable::doCheckEvictions(boost::system::error_code const& _ec) bool evictionsRemain = false; list> drop; { - Guard ln(x_nodes); Guard le(x_evictions); + Guard ln(x_nodes); for (auto& e: m_evictions) if (chrono::steady_clock::now() - e.first.second > c_reqTimeout) if (m_nodes.count(e.second)) diff --git a/libp2p/NodeTable.h b/libp2p/NodeTable.h index b615a197e..458044997 100644 --- a/libp2p/NodeTable.h +++ b/libp2p/NodeTable.h @@ -254,7 +254,7 @@ private: mutable Mutex x_state; ///< LOCK x_state first if both x_nodes and x_state locks are required. std::array m_state; ///< State of p2p node network. - Mutex x_evictions; ///< LOCK x_nodes first if both x_nodes and x_evictions locks are required. + Mutex x_evictions; ///< LOCK x_evictions first if both x_nodes and x_evictions locks are required. std::deque m_evictions; ///< Eviction timeouts. Mutex x_pubkDiscoverPings; ///< LOCK x_nodes first if both x_nodes and x_pubkDiscoverPings locks are required.