[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon Jan 2 06:02:51 UTC 2017


 wsd/DocumentBroker.cpp |    2 +-
 wsd/DocumentBroker.hpp |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3844f5934e06273067e7da562f2dd53f409ada30
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Fri Dec 30 17:17:07 2016 -0500

    wsd: use isAlive before sending message to child
    
    Change-Id: Ie463f89226bc0391102a3a4ae700e90cd3993271
    Reviewed-on: https://gerrit.libreoffice.org/32612
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index e1242b4..7140e34 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1055,7 +1055,7 @@ void DocumentBroker::terminateChild(std::unique_lock<std::mutex>& lock, const st
     LOG_INF("Terminating child [" << getPid() << "] of doc [" << _docKey << "].");
 
     // Close all running sessions
-    for (auto& pair : _sessions)
+    for (const auto& pair : _sessions)
     {
         try
         {
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 9d227f1..d913adc 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -75,7 +75,7 @@ public:
 
         try
         {
-            if (_pid != -1 && _ws)
+            if (isAlive())
             {
                 sendTextFrame("exit");
             }


More information about the Libreoffice-commits mailing list