loleaflet/src/map/Map.js | 12 +++++------- wsd/LOOLWSD.cpp | 15 ++++++++------- 2 files changed, 13 insertions(+), 14 deletions(-)
New commits: commit c0f9ccee425a3bef5efbebccc19afecd371eeddc Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Nov 27 18:10:50 2016 -0500 loleaflet: activate and dismiss dialogs only upon reconnection Change-Id: I2d8b3d9788b7f66bc746537e34c90493a7cb408a Reviewed-on: https://gerrit.libreoffice.org/31296 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index aaa04ac..317bf7c 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -746,16 +746,14 @@ L.Map = L.Evented.extend({ this._socket.sendMessage('useractive'); this._active = true; this._docLayer._onMessage('invalidatetiles: EMPTY', null); + if (vex.dialogID > 0) { + var id = vex.dialogID; + vex.dialogID = -1; + return vex.close(id); + } } else { - this._active = true; this._socket.initialize(this); } - - if (vex.dialogID > 0) { - var id = vex.dialogID; - vex.dialogID = -1; - return vex.close(id); - } } return false; commit 68519f09278eb2c7d35f014008b42f25fc972c77 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Nov 27 19:07:32 2016 -0500 loolwsd: destroy DocBrokers sooner Change-Id: I10d8ea57083c3b785748062a927574a63e0dd250 Reviewed-on: https://gerrit.libreoffice.org/31297 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index bb1285a..25a4bab 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -2114,10 +2114,15 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/) LOG_INF("Stopping server socket listening. ShutdownFlag: " << SigUtil::isShuttingDown() << ", TerminationFlag: " << TerminationFlag); + // Wait until documents are saved and sessions closed. srv.stop(); srv2.stop(); threadPool.joinAll(); + // atexit handlers tend to free Admin before Documents + LOG_INF("Cleaning up lingering documents."); + DocBrokers.clear(); + // Terminate child processes LOG_INF("Requesting forkit process " << forKitPid << " to terminate."); SigUtil::killChild(forKitPid); @@ -2133,7 +2138,7 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/) waitpid(forKitPid, &status, WUNTRACED); close(ForKitWritePipe); - // In case forkit didn't cleanup fully.' + // In case forkit didn't cleanup properly, don't leave jails behind. LOG_INF("Cleaning up childroot directory [" << ChildRoot << "]."); std::vector<std::string> jails; File(ChildRoot).list(jails); @@ -2144,21 +2149,17 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/) FileUtil::removeFile(path, true); } + // Finally, we no longer need SSL. if (LOOLWSD::isSSLEnabled()) { Poco::Net::uninitializeSSL(); Poco::Crypto::uninitializeCrypto(); } - // atexit handlers tend to free Admin before Documents - LOG_INF("Cleaning up lingering documents."); - DocBrokers.clear(); - - LOG_INF("Process [loolwsd] finished."); - int returnValue = Application::EXIT_OK; UnitWSD::get().returnValue(returnValue); + LOG_INF("Process [loolwsd] finished."); return returnValue; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits