mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +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
Notes:
sideshowbarker
2024-07-19 09:50:35 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/60d5b06e216
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…
Reference in a new issue