From 121008379b09ce86d37a8558cd3d4e5bd71c3543 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 15 Oct 2020 18:17:16 +0200 Subject: [PATCH] closing websocket explicit, before reopening it, to not end up with multiple connections and doublicated messages --- api/js/jsapi/egw_json.js | 1 + 1 file changed, 1 insertion(+) diff --git a/api/js/jsapi/egw_json.js b/api/js/jsapi/egw_json.js index f17062fe18..417065f58d 100644 --- a/api/js/jsapi/egw_json.js +++ b/api/js/jsapi/egw_json.js @@ -118,6 +118,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) { console.log("Server did not respond to ping in "+max_ping_response_time+" seconds --> try reconnecting"); check_timer = null; + this.websocket.close(); // closing it now, before reopening it, to not end up with multiple connections this.openWebSocket(url, tokens, account_id, error, reconnect_time); }.bind(this), max_ping_response_time); }.bind(this);