diff options
author | luigi1111 <luigi1111w@gmail.com> | 2020-11-06 18:53:22 -0600 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2020-11-06 18:53:22 -0600 |
commit | 1a3bef15b9b881e62748bc50a58f346d4b284af1 (patch) | |
tree | d95c68399e6cc0af1c3f524d845f8df6001acdd1 /src/p2p | |
parent | Merge pull request #6992 (diff) | |
parent | p2p: fix accessing non existent element of map (diff) | |
download | monero-1a3bef15b9b881e62748bc50a58f346d4b284af1.tar.xz |
Merge pull request #6993v0.17.1.2
44c93bb p2p: fix accessing non existent element of map (moneromooo-monero)
Diffstat (limited to 'src/p2p')
-rw-r--r-- | src/p2p/net_node.inl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 80fe2828a..23ac7bdf0 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -1300,7 +1300,10 @@ namespace nodetool template<class t_payload_net_handler> bool node_server<t_payload_net_handler>::try_to_connect_and_handshake_with_new_peer(const epee::net_utils::network_address& na, bool just_take_peerlist, uint64_t last_seen_stamp, PeerType peer_type, uint64_t first_seen_stamp) { - network_zone& zone = m_network_zones.at(na.get_zone()); + const auto i = m_network_zones.find(na.get_zone()); + if (i == m_network_zones.end()) + return false; + network_zone& zone = i->second; if (zone.m_connect == nullptr) // outgoing connections in zone not possible return false; |