From 8bda6989547a468d8edff23cfb1637f0e39f0ec9 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 27 Oct 2020 14:19:25 +0100 Subject: [PATCH] try to fix race-condition in reconnecting a "lost" websocket connection --- api/js/jsapi/egw_json.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/jsapi/egw_json.js b/api/js/jsapi/egw_json.js index fcb38a7c01..91f101bf01 100644 --- a/api/js/jsapi/egw_json.js +++ b/api/js/jsapi/egw_json.js @@ -122,7 +122,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) { this.websocket = null; this.openWebSocket(url, tokens, account_id, error, reconnect_time); - } + }.bind(this); this.websocket.close(); // closing it now, before reopening it, to not end up with multiple connections }.bind(this), max_ping_response_time); }.bind(this);