]> granicus.if.org Git - icinga2/commitdiff
Make sure we're not running command_endpoint-based checks more than once
authorGunnar Beutner <gunnar@beutner.name>
Thu, 21 Jan 2016 09:32:38 +0000 (10:32 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 23 Feb 2016 09:46:18 +0000 (10:46 +0100)
refs #10963

lib/icinga/checkable-check.cpp

index 3c29a5b502c00e0b86cdab83944db10d3a1306c3..4459c15f5b1812260ef7d92e9351b626973f4b25 100644 (file)
@@ -444,6 +444,10 @@ void Checkable::ExecuteCheck(void)
                        if (listener)
                                listener->SyncSendMessage(endpoint, message);
 
+                       /* Re-schedule the check so we don't run it again until after we've received
+                          a check result from the remote instance. The check will be re-scheduled
+                          using the proper check interval once we've received a check result. */
+                       SetNextCheck(Utility::GetTime() + GetCheckCommand()->GetTimeout() + 30);
                } else if (Application::GetInstance()->GetStartTime() < Utility::GetTime() - 30) {
                        /* fail to perform check on unconnected endpoint */
                        cr->SetState(ServiceUnknown);