From 52d53aafe43f5bfa78c7da11a9efc9c3f4c573e8 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 12 Jun 2022 10:47:12 -0400 Subject: [PATCH] Delay wss error message for slower systems --- app/frontend/templates/base.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/frontend/templates/base.html b/app/frontend/templates/base.html index 0ef79be5..4b28120a 100755 --- a/app/frontend/templates/base.html +++ b/app/frontend/templates/base.html @@ -220,7 +220,7 @@ }; wsInternal.onclose = function (closeEvent) { console.log('Closed WebSocket', closeEvent); - warn('WebSockets are required for Crafty to work. This websocket connection has been closed. Are you using a reverse proxy?', 'https://wiki.craftycontrol.com/en/4/docs/Reverse%20Proxy%20Examples') + setTimeout(sendWssError, 7000); }; @@ -339,6 +339,10 @@ }); } + function sendWssError(){ + warn('WebSockets are required for Crafty to work. This websocket connection has been closed. Are you using a reverse proxy?', 'https://wiki.craftycontrol.com/en/4/docs/Reverse%20Proxy%20Examples') + } + function eulaAgree(server_id, command) { //< !--this getCookie function is in base.html-- > var token = getCookie("_xsrf");