Reset Checkable#force_next_check after starting check plugin

... so this attribute is available for the plugin.

refs #7105
This commit is contained in:
Alexander A. Klimov 2020-05-12 13:25:00 +02:00
parent a65f2d6b41
commit a777bee244

View File

@ -206,11 +206,6 @@ void CheckerComponent::CheckThreadProc()
lock.unlock();
if (forced) {
ObjectLock olock(checkable);
checkable->SetForceNextCheck(false);
}
Log(LogDebug, "CheckerComponent")
<< "Executing check for '" << checkable->GetName() << "'";
@ -250,6 +245,13 @@ void CheckerComponent::ExecuteCheckHelper(const Checkable::Ptr& checkable)
Log(LogCritical, "checker", output);
}
{
ObjectLock oLock (checkable);
if (checkable->GetForceNextCheck()) {
checkable->SetForceNextCheck(false);
}
}
Checkable::DecreasePendingChecks();
{