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

Henry Castro hcastro at collabora.com
Sun Feb 14 18:38:33 UTC 2016


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

New commits:
commit f5c163e6daf3638a2fec2f65aa2372f6a96b4d36
Author: Henry Castro <hcastro at collabora.com>
Date:   Sun Feb 14 14:39:02 2016 -0400

    loolwsd: avoid deadlock with mutex and join

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 6f1fc63..2b47a0b 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -325,8 +325,6 @@ public:
 
     ~Document()
     {
-        std::unique_lock<std::recursive_mutex> lock(_mutex);
-
         Log::info("~Document dtor for url [" + _url + "] on child [" + _jailId +
                   "]. There are " + std::to_string(_clientViews) + " views.");
 
@@ -360,6 +358,8 @@ public:
             }
         }
 
+        std::unique_lock<std::recursive_mutex> lock(_mutex);
+
         // Destroy all connections and views.
         _connections.clear();
 


More information about the Libreoffice-commits mailing list