loleaflet/src/core/Socket.js |    8 ++++----
 loleaflet/src/map/Map.js     |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit fcffb01725c10fe0294fd669a8c16948a93f7e01
Author: Pranav Kant <pran...@collabora.co.uk>
Date:   Mon Sep 18 21:35:34 2017 +0530

    Don't forget reconnecting the socket in these cases
    
    This regressed with 7c1e1120c63661d84a5696c5b10a961477228e19
    
    Calling .initialize() on socket object is not enough anymore after above
    mentioned commit; it doesn't re-establish the socket connection as
    was the intent earlier in following cases.
    
    Change-Id: Icd0a87a875eb275ed3c914474cdc502b460e2d16
    Reviewed-on: https://gerrit.libreoffice.org/42431
    Reviewed-by: Henry Castro <hcas...@collabora.com>
    Tested-by: Henry Castro <hcas...@collabora.com>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 155494e2..c0929ffd 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -91,7 +91,7 @@ L.Socket = L.Class.extend({
 
                var socketState = this.socket.readyState;
                if (socketState === 2 || socketState === 3) {
-                       this.initialize(this._map);
+                       this._map.loadDocument();
                }
 
                if (socketState === 1) {
@@ -297,7 +297,7 @@ L.Socket = L.Class.extend({
                                        }
 
                                        try {
-                                               socket.initialize(map);
+                                               map.loadDocument(map);
                                        } catch (error) {
                                        }
                                }, timeoutMs);
@@ -514,10 +514,10 @@ L.Socket = L.Class.extend({
                                        callback: L.bind(function(data) {
                                                if (data) {
                                                        this._map._docPassword 
= data.password;
-                                                       
this.initialize(this._map);
+                                                       
this._map.loadDocument();
                                                } else if (passwordType === 
'to-modify') {
                                                        this._map._docPassword 
= '';
-                                                       
this.initialize(this._map);
+                                                       
this._map.loadDocument();
                                                } else {
                                                        this._map.hideBusy();
                                                }
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 25eeae39..79856073 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -845,7 +845,7 @@ L.Map = L.Evented.extend({
                                        return vex.close(id);
                                }
                        } else {
-                               this._socket.initialize(this);
+                               this.loadDocument();
                        }
                }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to