forked from lthn/blockchain
p2p: immediately close outgoing connection if handshake fails (fixes a rare connectivity bug)
This commit is contained in:
parent
309821c985
commit
998ab7cfa8
1 changed files with 3 additions and 1 deletions
|
|
@ -688,9 +688,11 @@ namespace nodetool
|
|||
LOG_PRINT_CC_L0(con, "Failed to HANDSHAKE with peer "
|
||||
<< string_tools::get_ip_string_from_int32(na.ip)
|
||||
<< ":" << string_tools::num_to_string_fast(na.port)
|
||||
/*<< ", try " << try_count*/);
|
||||
<< ", closing connection");
|
||||
m_net_server.get_config_object().close(con.m_connection_id);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(just_take_peerlist)
|
||||
{
|
||||
m_net_server.get_config_object().close(con.m_connection_id);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue