diff --git a/Libraries/LibC/netdb.cpp b/Libraries/LibC/netdb.cpp index 9a74e7d155b..b4e2bf1b982 100644 --- a/Libraries/LibC/netdb.cpp +++ b/Libraries/LibC/netdb.cpp @@ -38,6 +38,10 @@ static int connect_to_lookup_server() rc = connect(fd, (const sockaddr*)&address, sizeof(address)); if (rc == 0) break; + if (rc < 0) { + perror("connect_to_lookup_server"); + break; + } --retries; sleep(1); }