mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
console.js/fhemweb.js: changeing websocket ping (Forum #85080)
git-svn-id: https://svn.fhem.de/fhem/trunk@16348 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
98d4f66bf7
commit
45ac1a23a7
@ -8,7 +8,7 @@ var consLastIndex = 0;
|
|||||||
var withLog = 0;
|
var withLog = 0;
|
||||||
var mustScroll = 1;
|
var mustScroll = 1;
|
||||||
|
|
||||||
log("Console is opening");
|
log("Event monitor is starting");
|
||||||
|
|
||||||
function
|
function
|
||||||
cons_closeConn()
|
cons_closeConn()
|
||||||
@ -91,7 +91,7 @@ consFill()
|
|||||||
consConn.onclose =
|
consConn.onclose =
|
||||||
consConn.onerror =
|
consConn.onerror =
|
||||||
consConn.onmessage = consUpdate;
|
consConn.onmessage = consUpdate;
|
||||||
setTimeout(function(){FW_wsPing(consConn);}, 30000);
|
consConn.onopen = function(){FW_wsPing(consConn);};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if(consConn) {
|
if(consConn) {
|
||||||
|
@ -1108,7 +1108,7 @@ FW_longpoll()
|
|||||||
FW_pollConn.onclose =
|
FW_pollConn.onclose =
|
||||||
FW_pollConn.onerror =
|
FW_pollConn.onerror =
|
||||||
FW_pollConn.onmessage = FW_doUpdate;
|
FW_pollConn.onmessage = FW_doUpdate;
|
||||||
setTimeout(function(){FW_wsPing(FW_pollConn);}, 30000);
|
FW_pollConn.onopen = function(){FW_wsPing(FW_pollConn);};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
FW_pollConn = new XMLHttpRequest();
|
FW_pollConn = new XMLHttpRequest();
|
||||||
@ -1131,7 +1131,7 @@ FW_wsPing(conn) // idle websockets are closed by the browser after 55sec
|
|||||||
if(!conn || conn.readyState != conn.OPEN)
|
if(!conn || conn.readyState != conn.OPEN)
|
||||||
return;
|
return;
|
||||||
conn.send("\n");
|
conn.send("\n");
|
||||||
setTimeout(function(){FW_wsPing(conn);}, 30000);
|
// setTimeout(function(){FW_wsPing(conn);}, 30000);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************** LONGPOLL END **************/
|
/*************** LONGPOLL END **************/
|
||||||
|
Loading…
Reference in New Issue
Block a user