mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:27:45 +00:00
LibC: Fail name lookups immediately if we can't connect to LookupServer
This commit is contained in:
parent
a9e3575a18
commit
f3dad64a3b
1 changed files with 4 additions and 0 deletions
|
@ -38,6 +38,10 @@ static int connect_to_lookup_server()
|
||||||
rc = connect(fd, (const sockaddr*)&address, sizeof(address));
|
rc = connect(fd, (const sockaddr*)&address, sizeof(address));
|
||||||
if (rc == 0)
|
if (rc == 0)
|
||||||
break;
|
break;
|
||||||
|
if (rc < 0) {
|
||||||
|
perror("connect_to_lookup_server");
|
||||||
|
break;
|
||||||
|
}
|
||||||
--retries;
|
--retries;
|
||||||
sleep(1);
|
sleep(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue