]> granicus.if.org Git - icinga2/commitdiff
Remove stale subscriptions from local endpoint
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 24 Jan 2013 09:21:26 +0000 (10:21 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 24 Jan 2013 09:21:26 +0000 (10:21 +0100)
Fixes #3563

lib/remoting/endpointmanager.cpp

index 077b10643f45faee6781d34259bd9f7ac09e3261..883b260ff631153b45d7daf30601d6b1f7db2207 100644 (file)
@@ -331,7 +331,8 @@ void EndpointManager::SubscriptionTimerHandler(void)
        BOOST_FOREACH(tie(tuples::ignore, object), DynamicType::GetByName("Endpoint")->GetObjects()) {
                Endpoint::Ptr endpoint = dynamic_pointer_cast<Endpoint>(object);
 
-               if (!endpoint->IsLocalEndpoint())
+               /* don't copy subscriptions from non-local endpoints or the identity endpoint */
+               if (!endpoint->IsLocalEndpoint() || endpoint == m_Endpoint)
                        continue;
 
                if (endpoint->GetSubscriptions()) {