From ed703b461b3c6517251b5139e24254b21493d2f5 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Mon, 25 Jan 2021 21:37:50 +0100 Subject: 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. --- Userland/Services/WindowServer/ClientConnection.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Services/WindowServer/ClientConnection.cpp b/Userland/Services/WindowServer/ClientConnection.cpp index 947b25c8f5..3fdce5cd6c 100644 --- a/Userland/Services/WindowServer/ClientConnection.cpp +++ b/Userland/Services/WindowServer/ClientConnection.cpp @@ -892,6 +892,7 @@ void ClientConnection::may_have_become_unresponsive() m_ping_timer = Core::Timer::create_single_shot(1000, [this] { set_unresponsive(true); }); + m_ping_timer->start(); } void ClientConnection::did_become_responsive() -- cgit v1.2.3