From: Stephen Smith Date: Mon, 25 Apr 2022 19:55:02 +0000 (-0400) Subject: 18978: Disable webshell idle timeout when 0. X-Git-Tag: 2.4.1~1^2~5^2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/1297a59f47368687666de59ff352870f7dafc64c 18978: Disable webshell idle timeout when 0. Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- 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); }