mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Kernel/Net: Socket connected state change should reevaluate blocks
This fixes an issue where TCP sockets could get into the Established state too quickly and fail to unblock a subsequent sys$select() call. This makes websites load *significantly* faster. :^)
This commit is contained in:
@@ -269,4 +269,13 @@ KResult Socket::stat(::stat& st) const
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
void Socket::set_connected(bool connected)
|
||||
{
|
||||
LOCKER(lock());
|
||||
if (m_connected == connected)
|
||||
return;
|
||||
m_connected = connected;
|
||||
evaluate_block_conditions();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user