]> git.sur5r.net Git - i3/i3status/blobdiff - src/get_ipv6_addr.c
Don’t perror("connect") when there most likely is no IPv6 connectivity
[i3/i3status] / src / get_ipv6_addr.c
index 2fd978be91f721b1cf322315f91d36c9bfb12004..aa09d3a2ed7e515a18602f2bdef5ed83be21dd6d 100644 (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 don’t display the error here because most
+                         * likely, there just is no IPv6 connectivity.
+                         * Thus, don’t spam the user’s console but just
+                         * try the next address. */
                         (void)close(fd);
                         continue;
                 }