common/SigUtil.cpp | 2 +- loleaflet/src/core/Socket.js | 16 +++++++++------- wsd/protocol.txt | 6 ++++++ 3 files changed, 16 insertions(+), 8 deletions(-)
New commits: commit 2239f25684a9bf0d236246f2e716e5aa79244e97 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Nov 27 18:08:51 2016 -0500 Renamed 'shutdown' to 'shuttingdown' Change-Id: Idae53a59af13eb54b1f18f1a8cd1dde06421b426 Reviewed-on: https://gerrit.libreoffice.org/31295 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/common/SigUtil.cpp b/common/SigUtil.cpp index 02443df..4a6882e 100644 --- a/common/SigUtil.cpp +++ b/common/SigUtil.cpp @@ -257,7 +257,7 @@ namespace SigUtil if (ShutdownRequestFlag) { LOG_INF("Shutdown requested. Initiating WSD shutdown."); - Util::alertAllUsers("close: shutdown"); + Util::alertAllUsers("close: shuttingdown"); ShutdownFlag = true; return true; } diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index e3799b6..eab6ca8 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -192,8 +192,8 @@ L.Socket = L.Class.extend({ if (textMsg === 'ownertermination') { msg = _('Session terminated by document owner'); } - else if (textMsg === 'shutdown') { - msg = _('Server shutdown for maintenance'); + else if (textMsg === 'shuttingdown') { + msg = _('Server is shutting down for maintenance (auto-saving)'); } // Close any open dialogs first. @@ -230,12 +230,14 @@ L.Socket = L.Class.extend({ $(options.appendLocation).append(options.$vex); vex.setupBodyClassName(options.$vex); - // Disconnect the websocket manually - this.close(); + if (textMsg !== 'shuttingdown') { + // Tell WOPI host about it which should handle this situation + this._map.fire('postMessage', {msgId: 'Session_Closed'}); + } - // Tell WOPI host about it which should handle this situation - this._map.fire('postMessage', {msgId: 'Session_Closed'}); - this._map.remove(); + if (textMsg === 'ownertermination') { + this._map.remove(); + } return; } diff --git a/wsd/protocol.txt b/wsd/protocol.txt index 85470a4..2ebdc33 100644 --- a/wsd/protocol.txt +++ b/wsd/protocol.txt @@ -248,6 +248,12 @@ close: <reason> ability to kill all other sessions if EnableOwnerTermination flag in WOPI CheckFileInfo is 'true' (assumed to be 'false' by default). + + * shuttingdown - Sent when the server is going down in a graceful fashion. + The server doesn't disconnect from clients yet, but starts + saving document and tearing down internals. + + getchildid: id=<id> Returns the child id _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits