From 31dc71afafe0e0ae7c0a5248a76ef9248b1de966 Mon Sep 17 00:00:00 2001 From: moneromooo Date: Thu, 31 Dec 2020 02:05:39 +0000 Subject: [PATCH] p2p: fix deadlock banning while updating peer lists --- src/p2p/net_node.inl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 4f47cf2b5..ef6e2058c 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -2111,6 +2111,7 @@ namespace nodetool LOG_DEBUG_CC(context, "REMOTE PEERLIST: remote peerlist size=" << peerlist_.size()); LOG_TRACE_CC(context, "REMOTE PEERLIST: " << ENDL << print_peerlist_to_string(peerlist_)); + CRITICAL_REGION_LOCAL(m_blocked_hosts_lock); return m_network_zones.at(context.m_remote_address.get_zone()).m_peerlist.merge_peerlist(peerlist_, [this](const peerlist_entry &pe) { return !is_addr_recently_failed(pe.adr) && is_remote_host_allowed(pe.adr); });