]> granicus.if.org Git - icinga2/commitdiff
checker: Fix waiting for non-authoritative checks.
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 12 Sep 2013 13:31:07 +0000 (15:31 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 12 Sep 2013 13:31:07 +0000 (15:31 +0200)
components/checker/checkercomponent.cpp

index 84770f6a20612d61f6b9949c58df103f670211e3..392baf3508845b3e9e305a24c190a78a282e972c 100644 (file)
@@ -90,6 +90,11 @@ void CheckerComponent::CheckThreadProc(void)
 
                double wait = service->GetNextCheck() - Utility::GetTime();
 
+               bool authoritative = service->HasAuthority("checker");
+
+               if (!authoritative)
+                       wait = 60;
+
                if (wait > 0) {
                        /* Make sure the service we just examined can be destroyed while we're waiting. */
                        service.reset();
@@ -105,12 +110,6 @@ void CheckerComponent::CheckThreadProc(void)
 
                bool forced = service->GetForceNextCheck();
                bool check = true;
-               bool authoritative = service->HasAuthority("checker");
-
-               if (!authoritative) {
-                       Log(LogDebug, "checker", "Skipping check for service '" + service->GetName() + "': not authoritative");
-                       check = false;
-               }
 
                if (!forced) {
                        if (!service->GetEnableActiveChecks()) {