[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/src

Ashod Nakashian ashod.nakashian at collabora.co.uk
Tue Apr 11 12:57:46 UTC 2017


 loleaflet/src/core/Socket.js |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit b0c247bd3d7a83169bc89eee7198b2e5417c8cea
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sun Apr 9 19:21:16 2017 -0400

    loleaflet: reconnect transparently the first time
    
    Don't show the "This is embarrassing" popup before
    first trying to reconnect at least once.
    
    In most cases reconnection is successful transparently.
    
    However, if necessary, we could add some delay to
    reconnecting to give the server time to recover,
    but without good reason for this complication it's
    unwarranted. Server-recycling reconnections have
    such a delay.
    
    Change-Id: Ic8e32c451429a24f8362431672057145a492a23f
    Reviewed-on: https://gerrit.libreoffice.org/36328
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>
    (cherry picked from commit 55180606f856189a39cd448c0476c11417f06193)
    Reviewed-on: https://gerrit.libreoffice.org/36342
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 787a487e..c2ef985b 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -537,7 +537,8 @@ L.Socket = L.Class.extend({
 			this._map._docLayer.removeAllViews();
 		}
 
-		if (isActive) {
+		if (isActive && this._reconnecting) {
+			// Don't show this before first transparently trying to reconnect.
 			this._map.fire('error', {msg: _('Well, this is embarrassing, we cannot connect to your document. Please try again.'), cmd: 'socket', kind: 'closed', id: 4});
 		}
 


More information about the Libreoffice-commits mailing list