diff options
author | kleines Filmröllchen <filmroellchen@serenityos.org> | 2022-11-23 13:23:25 +0100 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2022-12-15 00:21:00 -0700 |
commit | 0beca846245d406675a519518a678a57b147aa62 (patch) | |
tree | b842f94f9bfb433b3a27abfdf4dafe9f7e8dde26 | |
parent | 766944128266909e3f91c2090f25e4573ec405c8 (diff) | |
download | serenity-0beca846245d406675a519518a678a57b147aa62.zip |
LibIPC: Only run responsiveness timer when there is an event loop
This disables responsiveness detection when an event loop is absent.
There are no users which both need this feature but don't have an event
loop.
-rw-r--r-- | Userland/Libraries/LibIPC/Connection.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Libraries/LibIPC/Connection.cpp b/Userland/Libraries/LibIPC/Connection.cpp index 30b54a5576..e6247d264c 100644 --- a/Userland/Libraries/LibIPC/Connection.cpp +++ b/Userland/Libraries/LibIPC/Connection.cpp @@ -105,7 +105,10 @@ ErrorOr<void> ConnectionBase::post_message(MessageBuffer buffer) dbgln("LibIPC::Connection FIXME Warning, needed {} writes needed to send message of size {}B, this is pretty bad, as it spins on the EventLoop", writes_done, initial_size); } - m_responsiveness_timer->start(); + // Note: This disables responsiveness detection when an event loop is absent. + // There are no users which both need this feature but don't have an event loop. + if (Core::EventLoop::has_been_instantiated()) + m_responsiveness_timer->start(); return {}; } |