mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibCore: Only wait 10ms between IPC connection retries instead of 1 sec
This makes startup feel way faster in case the WindowServer is not yet available when we try connecting to it from Taskbar, Terminal, etc.
This commit is contained in:
parent
904c871727
commit
f37cf5ea4a
Notes:
sideshowbarker
2024-07-19 11:29:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f37cf5ea4a2
1 changed files with 4 additions and 4 deletions
|
@ -61,14 +61,14 @@ namespace Client {
|
|||
CEventLoop::current().post_event(*this, make<PostProcessEvent>(m_connection->fd()));
|
||||
};
|
||||
|
||||
int retries = 1000;
|
||||
int retries = 100000;
|
||||
while (retries) {
|
||||
if (m_connection->connect(CSocketAddress::local(address))) {
|
||||
break;
|
||||
}
|
||||
|
||||
dbgprintf("Client::Connection: connect failed: %d, %s\n", errno, strerror(errno));
|
||||
sleep(1);
|
||||
usleep(10000);
|
||||
--retries;
|
||||
}
|
||||
ASSERT(m_connection->is_connected());
|
||||
|
@ -260,14 +260,14 @@ namespace Client {
|
|||
CEventLoop::current().post_event(*this, make<PostProcessEvent>(m_connection->fd()));
|
||||
};
|
||||
|
||||
int retries = 1000;
|
||||
int retries = 100000;
|
||||
while (retries) {
|
||||
if (m_connection->connect(CSocketAddress::local(address))) {
|
||||
break;
|
||||
}
|
||||
|
||||
dbgprintf("Client::Connection: connect failed: %d, %s\n", errno, strerror(errno));
|
||||
sleep(1);
|
||||
usleep(10000);
|
||||
--retries;
|
||||
}
|
||||
ASSERT(m_connection->is_connected());
|
||||
|
|
Loading…
Add table
Reference in a new issue