From 3a60ce6a979f0d0b440dfb82d94205ae2db31c7a Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Mon, 2 Jan 2023 23:22:18 +0100 Subject: [PATCH] Keep polling after error --- data/www/script.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/www/script.js b/data/www/script.js index 383275b..ac62b40 100644 --- a/data/www/script.js +++ b/data/www/script.js @@ -66,9 +66,11 @@ function handleStatus(data) { } function handleError() { + clearTimeout(statusTimeout); console.log("Lost connection :'("); document.body.classList.add("w3-disabled"); connectionOk = false; + statusTimeout = setTimeout(loadStatus, GLOBAL_TIMEOUT); } (() => {