1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +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:
Andreas Kling 2020-12-13 19:15:42 +01:00
parent 7b735b55e1
commit 48589db3aa
2 changed files with 10 additions and 1 deletions

View file

@ -91,7 +91,7 @@ public:
virtual Role role(const FileDescription&) const { return m_role; }
bool is_connected() const { return m_connected; }
void set_connected(bool connected) { m_connected = connected; }
void set_connected(bool);
bool can_accept() const { return !m_pending.is_empty(); }
RefPtr<Socket> accept();