loolwsd/DocumentBroker.cpp | 4 ++-- loolwsd/DocumentBroker.hpp | 2 +- loolwsd/LOOLWSD.cpp | 10 ++++------ 3 files changed, 7 insertions(+), 9 deletions(-)
New commits: commit 7043b95f4d9a1d01043f6b519d5845a52375f1d2 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Fri Oct 14 22:52:33 2016 -0400 loolwsd: fix convert-to after removing Prisoner WS Change-Id: I652a9fffa267e01043262eb25d3c2e19bf9eb447 Reviewed-on: https://gerrit.libreoffice.org/29940 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp index fd29bf5..77aa6ba 100644 --- a/loolwsd/DocumentBroker.cpp +++ b/loolwsd/DocumentBroker.cpp @@ -126,12 +126,12 @@ DocumentBroker::DocumentBroker() : DocumentBroker::DocumentBroker(const Poco::URI& uriPublic, const std::string& docKey, const std::string& childRoot, - std::shared_ptr<ChildProcess> childProcess) : + const std::shared_ptr<ChildProcess>& childProcess) : _uriPublic(uriPublic), _docKey(docKey), _childRoot(childRoot), _cacheRoot(getCachePath(uriPublic.toString())), - _childProcess(std::move(childProcess)), + _childProcess(childProcess), _lastSaveTime(std::chrono::steady_clock::now()), _markToDestroy(false), _lastEditableSession(false), diff --git a/loolwsd/DocumentBroker.hpp b/loolwsd/DocumentBroker.hpp index 00d27e2..d5e8b42 100644 --- a/loolwsd/DocumentBroker.hpp +++ b/loolwsd/DocumentBroker.hpp @@ -171,7 +171,7 @@ public: DocumentBroker(const Poco::URI& uriPublic, const std::string& docKey, const std::string& childRoot, - std::shared_ptr<ChildProcess> childProcess); + const std::shared_ptr<ChildProcess>& childProcess); ~DocumentBroker() { diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index 957749f..f709749 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -472,17 +472,11 @@ private: std::shared_ptr<WebSocket> ws; auto session = std::make_shared<ClientSession>(id, ws, docBroker, uriPublic); - // Request the child to connect to us and add this session. auto sessionsCount = docBroker->addSession(session); Log::trace(docKey + ", ws_sessions++: " + std::to_string(sessionsCount)); lock.unlock(); - // Wait until the client has connected with a prison socket. - waitBridgeCompleted(session); - // Now the bridge between the client and kit processes is connected - // Let messages flow - std::string encodedFrom; URI::encode(docBroker->getPublicUri().getPath(), "", encodedFrom); const std::string load = "load url=" + encodedFrom; @@ -524,6 +518,10 @@ private: sessionsCount = docBroker->removeSession(id); if (sessionsCount == 0) { + // At this point we're done. + // We can't save if we hadn't, just kill. + Log::debug("Closing child for docKey [" + docKey + "]."); + child->close(true); Log::debug("Removing DocumentBroker for docKey [" + docKey + "]."); docBrokers.erase(docKey); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits