]> granicus.if.org Git - icinga2/commitdiff
Fix a deadlock in WorkQueue::WorkerThreadProc
authorGunnar Beutner <gunnar@beutner.name>
Fri, 27 Feb 2015 17:29:21 +0000 (18:29 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Fri, 27 Feb 2015 17:32:20 +0000 (18:32 +0100)
refs #8554

lib/base/workqueue.cpp

index 427bbcae128bb74bde35ce74bd718fa579faa146..e8209fe981ad03793d96f5435675254f818f9476 100644 (file)
@@ -220,6 +220,10 @@ void WorkQueue::WorkerThreadProc(void)
                                m_ExceptionCallback(boost::current_exception());
                }
 
+               /* clear the task so whatever other resources it holds are released
+                  _before_ we re-acquire the mutex */
+               task = Task();
+
                lock.lock();
 
                m_Processing--;