From 1297a59f47368687666de59ff352870f7dafc64c Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Mon, 25 Apr 2022 15:55:02 -0400 Subject: [PATCH] 18978: Disable webshell idle timeout when 0. Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- public/webshell/index.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/public/webshell/index.html b/public/webshell/index.html index 5e3f32e4..aae70a97 100644 --- a/public/webshell/index.html +++ b/public/webshell/index.html @@ -88,10 +88,12 @@ sh.keysPressed(token + "\n"); sh.vt100('(sent authentication token)\n'); token = null; - updateIdleTimer(); - document.body.onmousemove = updateIdleTimer; - document.body.onkeydown = updateIdleTimer; - setTimeout(checkIdleTimer, 1000); + if (timeout > 0) { + updateIdleTimer(); + document.body.onmousemove = updateIdleTimer; + document.body.onkeydown = updateIdleTimer; + setTimeout(checkIdleTimer, 1000); + } } else { setTimeout(trySendToken, 200); } -- 2.30.2