mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +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
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()));
|
CEventLoop::current().post_event(*this, make<PostProcessEvent>(m_connection->fd()));
|
||||||
};
|
};
|
||||||
|
|
||||||
int retries = 1000;
|
int retries = 100000;
|
||||||
while (retries) {
|
while (retries) {
|
||||||
if (m_connection->connect(CSocketAddress::local(address))) {
|
if (m_connection->connect(CSocketAddress::local(address))) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
dbgprintf("Client::Connection: connect failed: %d, %s\n", errno, strerror(errno));
|
dbgprintf("Client::Connection: connect failed: %d, %s\n", errno, strerror(errno));
|
||||||
sleep(1);
|
usleep(10000);
|
||||||
--retries;
|
--retries;
|
||||||
}
|
}
|
||||||
ASSERT(m_connection->is_connected());
|
ASSERT(m_connection->is_connected());
|
||||||
|
@ -260,14 +260,14 @@ namespace Client {
|
||||||
CEventLoop::current().post_event(*this, make<PostProcessEvent>(m_connection->fd()));
|
CEventLoop::current().post_event(*this, make<PostProcessEvent>(m_connection->fd()));
|
||||||
};
|
};
|
||||||
|
|
||||||
int retries = 1000;
|
int retries = 100000;
|
||||||
while (retries) {
|
while (retries) {
|
||||||
if (m_connection->connect(CSocketAddress::local(address))) {
|
if (m_connection->connect(CSocketAddress::local(address))) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
dbgprintf("Client::Connection: connect failed: %d, %s\n", errno, strerror(errno));
|
dbgprintf("Client::Connection: connect failed: %d, %s\n", errno, strerror(errno));
|
||||||
sleep(1);
|
usleep(10000);
|
||||||
--retries;
|
--retries;
|
||||||
}
|
}
|
||||||
ASSERT(m_connection->is_connected());
|
ASSERT(m_connection->is_connected());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue