Don’t perror("connect") when there most likely is no IPv6 connectivity

This commit is contained in:
Michael Stapelberg 2009-07-25 21:23:39 +02:00
parent 4cf0073b5c
commit 94911d4cc3

View File

@ -41,7 +41,10 @@ const char *get_ipv6_addr() {
* it saves the local address with which packets would
* be sent to the destination. */
if (connect(fd, resp->ai_addr, resp->ai_addrlen) == -1) {
perror("connect()");
/* We dont display the error here because most
* likely, there just is no IPv6 connectivity.
* Thus, dont spam the users console but just
* try the next address. */
(void)close(fd);
continue;
}