From 0beca846245d406675a519518a678a57b147aa62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kleines=20Filmr=C3=B6llchen?= Date: Wed, 23 Nov 2022 13:23:25 +0100 Subject: [PATCH] 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. --- Userland/Libraries/LibIPC/Connection.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 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 {}; }