From e4bed6ea27c3c53faf68e94a26352c130316efc7 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 26 Jan 2021 16:22:37 +0100 Subject: [PATCH] Still mark setUnresponsive(false) when the pings arrive late It usually means that the client was busy and couldn't answer the ping as early as we'd hoped but there's a good chance the process is healthy again. --- src/xdgshellclient.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp index 83f1f06787..773e93122c 100644 --- a/src/xdgshellclient.cpp +++ b/src/xdgshellclient.cpp @@ -1147,11 +1147,8 @@ void XdgToplevelClient::handlePingDelayed(quint32 serial) void XdgToplevelClient::handlePongReceived(quint32 serial) { - auto it = m_pings.find(serial); - if (it != m_pings.end()) { - setUnresponsive(false); - m_pings.erase(it); - } + m_pings.remove(serial); + setUnresponsive(false); } void XdgToplevelClient::sendPing(PingReason reason)