mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
www/pgm2/fhemweb.js: avoid race condition(?) (Forum #112181)
git-svn-id: https://svn.fhem.de/fhem/trunk@22230 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
90231cfe55
commit
c5b71b99c1
@ -1056,7 +1056,8 @@ FW_doUpdate(evt)
|
||||
if(typeof WebSocket == "function" && evt && evt.target instanceof WebSocket) {
|
||||
if(evt.type == 'close' && !FW_leaving) {
|
||||
FW_errmsg(errstr, retryTime-100);
|
||||
FW_pollConn.close();
|
||||
if(FW_pollConn) // Race-condition(?) # 112181
|
||||
FW_pollConn.close();
|
||||
FW_pollConn = undefined;
|
||||
setTimeout(FW_longpoll, retryTime);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user