[Libreoffice-commits] online.git: 2 commits - loolwsd/LOOLKit.cpp

Tor Lillqvist tml at collabora.com
Wed Apr 13 09:23:06 UTC 2016


 loolwsd/LOOLKit.cpp |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 0f3d98d2d1bcd4f6a7d4b3c16c7cf11db70ad20f
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Apr 13 12:21:35 2016 +0300

    Try to use consistent indentation for parameters to SocketProcessors()
    
    But yeah, not sure why the blocks of the lambdas are de-indented like that.

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 68fe829..fe168e2 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -1017,7 +1017,8 @@ void lokit_main(const std::string& childRoot,
         ws->setReceiveTimeout(0);
 
         const std::string socketName = "ChildControllerWS";
-        IoUtil::SocketProcessor(ws, response, [&socketName, &ws, &document, &loKit](const std::vector<char>& data)
+        IoUtil::SocketProcessor(ws, response,
+                                [&socketName, &ws, &document, &loKit](const std::vector<char>& data)
                 {
                     std::string message(data.data(), data.size());
 
commit c8a46e78a8615caeffb541fe9b98b617b5e5538b
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Apr 13 12:17:59 2016 +0300

    bccu#1678: Check whether document can be discarded also in stop predicate
    
    Seems to fix the problem that the loolkit processes hang around
    forever even if there is no associated client.

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 12e652e..68fe829 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -1064,7 +1064,12 @@ void lokit_main(const std::string& childRoot,
 
                     return true;
                 },
-                [](){ return TerminationFlag; });
+                                [&document]()
+                {
+                    if (document && document->canDiscard())
+                        TerminationFlag = true;
+                    return TerminationFlag;
+                });
 
         // Cleanup jail.
         Util::removeFile(jailPath, true);


More information about the Libreoffice-commits mailing list