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.
This commit is contained in:
kleines Filmröllchen 2022-11-23 13:23:25 +01:00 committed by Andrew Kaster
parent 7669441282
commit 0beca84624
Notes: sideshowbarker 2024-07-17 06:35:23 +09:00

View file

@ -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 {};
}