SVGHMI: do not try to reconnect websocket if closed properly by server.
--- a/svghmi/svghmi.js Wed Nov 09 12:14:35 2022 +0100
+++ b/svghmi/svghmi.js Tue Nov 15 09:22:50 2022 +0100
@@ -637,6 +637,13 @@
ws = null;
// reconect
// TODO : add visible notification while waiting for reload
+ console.log(evt.wasClean)
+ console.log(evt.reason)
+ if(evt.code=1000){
+ // Do not attempt to reconnect immediately in case of Normal Closure
+ window.alert("Connection closed by server");
+ location.reload();
+ }
window.setTimeout(create_ws, reconnect_delay);
reconnect_delay += 500;
};