mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +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
Notes:
sideshowbarker
2024-07-19 07:02:38 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/628777f94ac Pull-request: https://github.com/SerenityOS/serenity/pull/2062
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
Reference in a new issue