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:
Andreas Kling 2019-12-16 17:44:26 +01:00
parent 647a95a812
commit 72bdf595cc
Notes: sideshowbarker 2024-07-19 10:50:22 +09:00

View file

@ -148,6 +148,12 @@ private:
}
ASSERT(decoded_bytes);
}
if (!m_unprocessed_messages.is_empty()) {
deferred_invoke([this](auto&) {
handle_messages();
});
}
return true;
}