On recovery: re-check children

This commit is contained in:
Alexander A. Klimov 2020-12-02 12:24:40 +01:00
parent 668bf06424
commit 854939a8ce
1 changed files with 14 additions and 0 deletions

View File

@ -242,6 +242,20 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
OnReachabilityChanged(this, cr, children, origin);
}
if (recovery) {
for (auto& child : children) {
if (child->GetProblem() && child->GetEnableActiveChecks()) {
auto nextCheck (now + Utility::Random() % 60);
ObjectLock oLock (child);
if (nextCheck < child->GetNextCheck()) {
child->SetNextCheck(nextCheck);
}
}
}
}
if (!reachable)
SetLastStateUnreachable(Utility::GetTime());