]> granicus.if.org Git - icinga2/commitdiff
Fix: Cluster WQ thread dies after fork()
authorGunnar Beutner <gunnar@beutner.name>
Tue, 9 Feb 2016 11:46:11 +0000 (12:46 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 23 Feb 2016 08:44:44 +0000 (09:44 +0100)
fixes #11118

lib/remote/apilistener.cpp

index 6d4e5871f7cef52689c74068f32af9aab603df3a..77049f71d04011adecde15f008722eb90dc49add 100644 (file)
@@ -566,6 +566,9 @@ void ApiListener::ApiTimerHandler(void)
 void ApiListener::RelayMessage(const MessageOrigin::Ptr& origin,
     const ConfigObject::Ptr& secobj, const Dictionary::Ptr& message, bool log)
 {
+       if (!IsActive())
+               return;
+
        m_RelayQueue.Enqueue(boost::bind(&ApiListener::SyncRelayMessage, this, origin, secobj, message, log), PriorityNormal, true);
 }