]> granicus.if.org Git - icinga2/commitdiff
Fix crash in ThreadPool::Stop
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 11 Dec 2014 08:33:07 +0000 (09:33 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 11 Dec 2014 08:34:57 +0000 (09:34 +0100)
fixes #8059

lib/base/threadpool.cpp

index 2a814134fd9a106c78ace552845b6ccbb080081b..b39ad0d0624922dee4d4330e7e6d7958b8c331ba 100644 (file)
@@ -60,7 +60,8 @@ void ThreadPool::Stop(void)
                m_MgmtCV.notify_all();
        }
 
-       m_MgmtThread.join();
+       if (m_MgmtThread.joinable())
+               m_MgmtThread.join();
 
        for (size_t i = 0; i < sizeof(m_Queues) / sizeof(m_Queues[0]); i++) {
                boost::mutex::scoped_lock lock(m_Queues[i].Mutex);