From d226d98269dca1a5c52f13a681e4740fe0a3d39d Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 29 Feb 2024 17:33:43 +0100 Subject: [PATCH] Restart the frame timer immediately This marks the timer as started again, before we call out to various external places that might be confused by the frame timer reporting that it is stopped. --- common/rfb/VNCServerST.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx index bea32abe17..296ddd8ed2 100644 --- a/common/rfb/VNCServerST.cxx +++ b/common/rfb/VNCServerST.cxx @@ -637,13 +637,13 @@ void VNCServerST::handleTimeout(Timer* t) if (comparer->is_empty()) return; + // If this is the first iteration then we need to adjust the timeout + frameTimer.repeat(1000/rfb::Server::frameRate); + writeUpdate(); msc++; desktop->frameTick(msc); - - // If this is the first iteration then we need to adjust the timeout - frameTimer.repeat(1000/rfb::Server::frameRate); } else if (t == &idleTimer) { slog.info("MaxIdleTime reached, exiting"); desktop->terminate();