2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +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:
rudolfkoenig 2020-06-22 10:54:26 +00:00
parent 90231cfe55
commit c5b71b99c1

View File

@ -1056,6 +1056,7 @@ FW_doUpdate(evt)
if(typeof WebSocket == "function" && evt && evt.target instanceof WebSocket) {
if(evt.type == 'close' && !FW_leaving) {
FW_errmsg(errstr, retryTime-100);
if(FW_pollConn) // Race-condition(?) # 112181
FW_pollConn.close();
FW_pollConn = undefined;
setTimeout(FW_longpoll, retryTime);