aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo <moneromoo@nowhere.nowhere.nowhere>2020-12-31 02:05:39 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-12-31 03:09:37 +0000
commit656b2f7ce14bfc6125e76eeef480f91a37b10b8a (patch)
tree916525117e51c99f72df03fee892a96797ee6959
parentMerge pull request #7221 (diff)
downloadmonero-656b2f7ce14bfc6125e76eeef480f91a37b10b8a.tar.xz
p2p: fix deadlock banning while updating peer lists
Diffstat (limited to '')
-rw-r--r--src/p2p/net_node.inl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index bf053f0f2..487e89923 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -2149,6 +2149,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);
});