LibC: Fail name lookups immediately if we can't connect to LookupServer

This commit is contained in:
Andreas Kling 2020-01-09 21:33:03 +01:00
parent a9e3575a18
commit f3dad64a3b
Notes: sideshowbarker 2024-07-19 10:14:25 +09:00

View file

@ -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);
}