mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Websocket auto serverinfo responder (#443)
* serverinfo cb * remove webui cron * missing header file * tcp connection should trigger to
This commit is contained in:
@@ -51,7 +51,6 @@ function connectionLostAction()
|
||||
{
|
||||
if(!connectionLost)
|
||||
{
|
||||
window.clearInterval(cronId);
|
||||
connectionLost = true;
|
||||
connectionTimer = window.setInterval(tryReconnect, 4000);
|
||||
}
|
||||
|
@@ -37,7 +37,6 @@ function restartAction()
|
||||
{
|
||||
if(!connectionLost)
|
||||
{
|
||||
window.clearInterval(cronId);
|
||||
connectionLost = true;
|
||||
connectionTimer = window.setInterval(tryReconnect, 1000);
|
||||
}
|
||||
|
@@ -15,7 +15,6 @@ var jsonPort = 19444;
|
||||
var websocket = null;
|
||||
var hyperion = {};
|
||||
var wsTan = 1;
|
||||
var cronId = 0;
|
||||
var ledStreamActive = false;
|
||||
var imageStreamActive = false;
|
||||
var loggingStreamActive = false;
|
||||
@@ -32,13 +31,6 @@ function initRestart()
|
||||
connectionLostDetection('restart');
|
||||
}
|
||||
|
||||
function cron()
|
||||
{
|
||||
requestServerInfo();
|
||||
$(hyperion).trigger({type:"cron"});
|
||||
}
|
||||
|
||||
|
||||
function connectionLostDetection(type)
|
||||
{
|
||||
if ( watchdog > 2 )
|
||||
@@ -82,7 +74,6 @@ function initWebSocket()
|
||||
$(hyperion).on("cmd-serverinfo", function(event) {
|
||||
watchdog = 0;
|
||||
});
|
||||
cronId = window.setInterval(cron,2000);
|
||||
};
|
||||
|
||||
websocket.onclose = function (event) {
|
||||
|
Reference in New Issue
Block a user