From: Gunnar Beutner Date: Thu, 21 Jan 2016 09:32:38 +0000 (+0100) Subject: Make sure we're not running command_endpoint-based checks more than once X-Git-Tag: v2.4.2~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7985e93ca04a411e73661afa35d0423657441432;p=icinga2 Make sure we're not running command_endpoint-based checks more than once refs #10963 --- diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp index 3c29a5b50..4459c15f5 100644 --- a/lib/icinga/checkable-check.cpp +++ b/lib/icinga/checkable-check.cpp @@ -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);