[Libreoffice-commits] online.git: loleaflet/js
Michael Meeks (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 8 15:14:35 UTC 2020
loleaflet/js/global.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 6232ff7184e3aaa7b98707a3c6963bab52c26cee
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Mon Jun 8 14:48:57 2020 +0100
Commit: Michael Meeks <michael.meeks at 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.meeks at 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() {
More information about the Libreoffice-commits
mailing list