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:
Andreas Kling 2019-10-31 16:28:30 +01:00
parent 904c871727
commit f37cf5ea4a
Notes: sideshowbarker 2024-07-19 11:29:34 +09:00

View file

@ -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());