X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/0ccf1750b4143223e729fc3212b5e4b0a447b420..199b80d7913ae588b098aa653ff0c24181a0a31a:/public/webshell/index.html diff --git a/public/webshell/index.html b/public/webshell/index.html index 028664c4..aae70a97 100644 --- a/public/webshell/index.html +++ b/public/webshell/index.html @@ -60,7 +60,7 @@ if (currentTime - lastTime > idleTimeoutMs) { //logout sh.reset(); - sh.sessionClosed(); + sh.sessionClosed("Session timed out after " + timeout + " seconds."); document.body.onmousemove = undefined; document.body.onkeydown = undefined; } else { @@ -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); }