mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:17:34 +00:00
LibIPC: Abort on connection failure
...instead of looping for (effectively) ever. Fixes https://github.com/SerenityOS/serenity/issues/1869
This commit is contained in:
parent
d5582596a9
commit
628777f94a
1 changed files with 3 additions and 9 deletions
|
@ -57,15 +57,9 @@ public:
|
|||
handle_messages();
|
||||
};
|
||||
|
||||
int retries = 100000;
|
||||
while (retries) {
|
||||
if (m_connection->connect(Core::SocketAddress::local(address))) {
|
||||
break;
|
||||
}
|
||||
|
||||
dbgprintf("Client::Connection: connect failed: %d, %s\n", errno, strerror(errno));
|
||||
usleep(10000);
|
||||
--retries;
|
||||
if (!m_connection->connect(Core::SocketAddress::local(address))) {
|
||||
perror("connect");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
ucred creds;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue