client: try to connect to all addresses before giving up
Don't give up when one of the addresses/hostnames specified by -h fails to resolve in DNS_Name2IPAddress(), e.g. with the default setting try to connect to ::1 even when 127.0.0.1 failed due to the -6 option.
This commit is contained in:
parent
46fad717e5
commit
c049bce007
1 changed files with 1 additions and 1 deletions
2
client.c
2
client.c
|
@ -172,7 +172,7 @@ get_sockaddrs(const char *hostnames, int port)
|
|||
} else {
|
||||
if (DNS_Name2IPAddress(hostname, ip_addrs, DNS_MAX_ADDRESSES) != DNS_Success) {
|
||||
DEBUG_LOG("Could not get IP address for %s", hostname);
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
for (i = 0; i < DNS_MAX_ADDRESSES && ip_addrs[i].family != IPADDR_UNSPEC; i++) {
|
||||
|
|
Loading…
Reference in a new issue