[Libreoffice-commits] online.git: loolwsd/MasterProcessSession.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Sun Dec 27 20:07:24 PST 2015
loolwsd/MasterProcessSession.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 72a1f18ebcb820f3321c56af915fda4a5910592e
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sat Dec 26 11:30:14 2015 -0500
loolwsd: fix detection of unreachable child
Change-Id: I619613067586ec824d17cacd6059168e9329ec4c
Reviewed-on: https://gerrit.libreoffice.org/20974
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/MasterProcessSession.cpp b/loolwsd/MasterProcessSession.cpp
index c466ad2..aa7258a 100644
--- a/loolwsd/MasterProcessSession.cpp
+++ b/loolwsd/MasterProcessSession.cpp
@@ -554,8 +554,7 @@ void MasterProcessSession::dispatchChild()
short nRequest = 3;
bool bFound = false;
- // Copy document into jail using the fixed name
-
+ // Wait until the child has connected with Master.
std::shared_ptr<MasterProcessSession> childSession;
std::unique_lock<std::mutex> lock(_availableChildSessionMutex);
@@ -588,7 +587,7 @@ void MasterProcessSession::dispatchChild()
lock.unlock();
- if (!nRequest && !bFound)
+ if (nRequest < 0 && !bFound)
{
Log::error("Failed to connect to child. Shutting down socket.");
Util::shutdownWebSocket(*_ws);
@@ -601,6 +600,7 @@ void MasterProcessSession::dispatchChild()
if (aUri.isRelative())
aUri = URI( URI("file://"), aUri.toString() );
+ // Copy document into jail using the fixed name
if (!aUri.empty() && aUri.getScheme() == "file")
{
const std::string aJailDoc = jailDocumentURL.substr(1) + Path::separator() + std::to_string(childSession->_pidChild);
More information about the Libreoffice-commits
mailing list