mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibIPC: Make sure we always process unhandled messages
A client that only ever does synchronous IPC calls from its side would never actually process incoming asynchronous messages since they would arrive while waiting for a synchronous response and then end up sitting forever in the "unhandled messages" queue. We now always handle unhandled messages using a deferred invocation. This fixes the bug where Audio.MenuApplet didn't learn that the muted state changed in response to its own request to change it. :^)
This commit is contained in:
parent
647a95a812
commit
72bdf595cc
Notes:
sideshowbarker
2024-07-19 10:50:22 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/72bdf595cc1
1 changed files with 6 additions and 0 deletions
|
@ -148,6 +148,12 @@ private:
|
|||
}
|
||||
ASSERT(decoded_bytes);
|
||||
}
|
||||
|
||||
if (!m_unprocessed_messages.is_empty()) {
|
||||
deferred_invoke([this](auto&) {
|
||||
handle_messages();
|
||||
});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue