mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 13:17:35 +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();
|
handle_messages();
|
||||||
};
|
};
|
||||||
|
|
||||||
int retries = 100000;
|
if (!m_connection->connect(Core::SocketAddress::local(address))) {
|
||||||
while (retries) {
|
perror("connect");
|
||||||
if (m_connection->connect(Core::SocketAddress::local(address))) {
|
ASSERT_NOT_REACHED();
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
dbgprintf("Client::Connection: connect failed: %d, %s\n", errno, strerror(errno));
|
|
||||||
usleep(10000);
|
|
||||||
--retries;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ucred creds;
|
ucred creds;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue