loleaflet/js/global.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 6232ff7184e3aaa7b98707a3c6963bab52c26cee Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Mon Jun 8 14:48:57 2020 +0100 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Mon Jun 8 17:14:17 2020 +0200 Proxy: only send close if we were connected. Change-Id: I4b80adb1d4f44efc02b784cad10f27e458921449 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95836 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js index 6430ec908..47bc7b648 100644 --- a/loleaflet/js/global.js +++ b/loleaflet/js/global.js @@ -498,12 +498,14 @@ navigator.sendBeacon(url, ''); }; this.close = function() { + var oldState = this.readyState; console.debug('proxy: close socket'); this.readyState = 3; this.onclose(); clearInterval(this.waitInterval); this.waitInterval = undefined; - this.sendCloseMsg(this.unloading); + if (oldState === 1) // was open + this.sendCloseMsg(this.unloading); this.sessionId = 'open'; }; this.setUnloading = function() { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits