1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:07:45 +00:00

WindowServer: Fix client unresponsiveness detection

This broke in add01b3, where Core::Timer::create_single_shot() was
changed to create a stopped timer. Fix it by actually starting the timer
right away ourselves.

Fixes #5111.
This commit is contained in:
Linus Groh 2021-01-25 21:37:50 +01:00 committed by Andreas Kling
parent 30e19c5a00
commit ed703b461b

View file

@ -892,6 +892,7 @@ void ClientConnection::may_have_become_unresponsive()
m_ping_timer = Core::Timer::create_single_shot(1000, [this] { m_ping_timer = Core::Timer::create_single_shot(1000, [this] {
set_unresponsive(true); set_unresponsive(true);
}); });
m_ping_timer->start();
} }
void ClientConnection::did_become_responsive() void ClientConnection::did_become_responsive()