diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 5c76f6e..65a42c4 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -644,6 +644,13 @@ namespace nodetool #undef LOG_PRINT_CC_PRIORITY_NODE + //----------------------------------------------------------------------------------- + template + void node_server::cache_connect_fail_info(const net_address& addr) + { + CRITICAL_REGION_LOCAL(m_conn_fails_cache_lock); + m_conn_fails_cache[addr] = time(NULL); + } //----------------------------------------------------------------------------------- template bool node_server::is_addr_recently_failed(const net_address& addr) @@ -703,8 +710,10 @@ namespace nodetool << "] last_seen: " << (pe.last_seen ? epee::misc_utils::get_time_interval_string(time(NULL) - pe.last_seen) : "never")); if(!try_to_connect_and_handshake_with_new_peer(pe.adr, false, pe.last_seen, use_white_list)) + { + cache_connect_fail_info(pe.adr); continue; - + } return true; } return false;