ProcessCheckResult(): Make sure hosts aren't locked during Service::GetSeverity()

This commit is contained in:
Noah Hilverling 2020-08-11 15:24:54 +02:00
parent 338d0aaa8c
commit ddf1e50d93
1 changed files with 4 additions and 1 deletions

View File

@ -358,9 +358,12 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
SetLastCheckResult(cr);
if (GetProblem() != wasProblem) {
for (auto& service : host->GetServices()) {
auto services = host->GetServices();
olock.Unlock();
for (auto& service : services) {
Service::OnHostProblemChanged(service, cr, origin);
}
olock.Lock();
}
}