From a777bee2449a339b287da64bcd50bbe84977b677 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 12 May 2020 13:25:00 +0200 Subject: [PATCH] Reset Checkable#force_next_check after starting check plugin ... so this attribute is available for the plugin. refs #7105 --- lib/checker/checkercomponent.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/checker/checkercomponent.cpp b/lib/checker/checkercomponent.cpp index 06ebb7bba..9368ba6a3 100644 --- a/lib/checker/checkercomponent.cpp +++ b/lib/checker/checkercomponent.cpp @@ -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(); {