diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-04-09 19:21:16 -0400 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-04-11 14:57:28 +0200 |
commit | b0c247bd3d7a83169bc89eee7198b2e5417c8cea (patch) | |
tree | 1dcc66d84ee0bac6954ef7284e9918caa90e4c55 /loleaflet | |
parent | 6dad3636fc92f0f22845f6ec0307e0fbe36d9bca (diff) |
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@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit 55180606f856189a39cd448c0476c11417f06193)
Reviewed-on: https://gerrit.libreoffice.org/36342
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'loleaflet')
-rw-r--r-- | loleaflet/src/core/Socket.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 787a487e6..c2ef985b6 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}); } |