diff --git a/app/js/common/version.js b/app/js/common/version.js index d0575e33..c25fc035 100644 --- a/app/js/common/version.js +++ b/app/js/common/version.js @@ -197,10 +197,14 @@ function verck(ver) { } } }); +} +var infostreaming=false; +function infowebsocket(){ infows = new WebSocket("wss://thedesk.top/ws/"); infows.onopen = function(mess) { console.log(tlid + ":Connect Streaming Info:"); console.log(mess); + infostreaming=true; } infows.onmessage = function(mess) { console.log(":Receive Streaming:"); @@ -246,11 +250,19 @@ function verck(ver) { } } infows.onerror = function(error) { + infostreaming=false; console.error("Error closing:info"); console.error(error); return false; }; infows.onclose = function() { + infostreaming=false; console.error("Closing:info"); }; -} \ No newline at end of file +} +setInterval(function(){ + if(!infostreaming){ + console.log("try to connect") + infowebsocket(); + } +}, 10000); \ No newline at end of file diff --git a/app/view/en/index.html b/app/view/en/index.html index 751f154b..c7344587 100644 --- a/app/view/en/index.html +++ b/app/view/en/index.html @@ -32,7 +32,7 @@