]> granicus.if.org Git - icinga2/commitdiff
Re-assign services from dead endoints.
authorGunnar Beutner <gunnar@beutner.name>
Fri, 22 Jun 2012 06:30:36 +0000 (08:30 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Fri, 22 Jun 2012 06:30:36 +0000 (08:30 +0200)
components/delegation/delegationcomponent.cpp

index 3a747025f3cca0900963c2d12a4bfbe5022f089c..4697b456d2c0c627138db3cc2a4183efe18bdd68 100644 (file)
@@ -202,7 +202,8 @@ void DelegationComponent::DelegationTimerHandler(void)
 
                /* don't re-assign service if the checker is still valid
                 * and doesn't have too many services */
-               if (oldEndpoint && find(candidates.begin(), candidates.end(), oldEndpoint) != candidates.end() &&
+               if (oldEndpoint && oldEndpoint->IsConnected() &&
+                   find(candidates.begin(), candidates.end(), oldEndpoint) != candidates.end() &&
                    histogram[oldEndpoint] <= avg_services + overflow_tolerance)
                        continue;