From c39df031d865c9abbd8d9e394f4116dc161285da Mon Sep 17 00:00:00 2001 From: Anton Lundin <anton@dohi.se> Date: Fri, 2 Aug 2013 09:56:15 +0200 Subject: [PATCH] clearTimeout instead of clearInterval for timers We create timeouts, not intervals. Then we need to clear them with clearTimeout. --- include/rfb.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/rfb.js b/include/rfb.js index 16ae76d..5258f09 100644 --- a/include/rfb.js +++ b/include/rfb.js @@ -403,7 +403,7 @@ updateState = function(state, statusMsg) { } if (msgTimer) { - clearInterval(msgTimer); + clearTimeout(msgTimer); msgTimer = null; } @@ -444,13 +444,13 @@ updateState = function(state, statusMsg) { if (connTimer && (rfb_state !== 'connect')) { Util.Debug("Clearing connect timer"); - clearInterval(connTimer); + clearTimeout(connTimer); connTimer = null; } if (disconnTimer && (rfb_state !== 'disconnect')) { Util.Debug("Clearing disconnect timer"); - clearInterval(disconnTimer); + clearTimeout(disconnTimer); disconnTimer = null; } -- 2.18.1