net: do not break when addr is not from a distinct network group

When the address is from a network group we already caught,
do a `continue` and try to find another address until conditions
are met or we reach the limit (`nTries`).
This commit is contained in:
brunoerg 2023-06-10 08:05:10 -03:00
parent 6f5f37eefd
commit 5fa4055452

View file

@ -1853,7 +1853,7 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
// Require outbound IPv4/IPv6 connections, other than feelers, to be to distinct network groups
if (!fFeeler && outbound_ipv46_peer_netgroups.count(m_netgroupman.GetGroup(addr))) {
break;
continue;
}
// if we selected an invalid or local address, restart