mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
WindowServer: Tear down WSClientConnection asynchronously
If something goes wrong when trying to message a windowing client, we now tear it down *on next event loop* instead of immediately. This avoids having to deal with disconnected windows suddenly disappearing from window lists while looping over them.
This commit is contained in:
parent
74829cdb75
commit
60d5b06e21
1 changed files with 3 additions and 1 deletions
|
@ -81,7 +81,9 @@ WSClientConnection::~WSClientConnection()
|
|||
|
||||
void WSClientConnection::die()
|
||||
{
|
||||
s_connections->remove(client_id());
|
||||
deferred_invoke([this](auto&) {
|
||||
s_connections->remove(client_id());
|
||||
});
|
||||
}
|
||||
|
||||
void WSClientConnection::notify_about_new_screen_rect(const Rect& rect)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue