Merge pull request #8168 from Icinga/bugfix/service-get-severity-deadlock-8160-2.12

ProcessCheckResult(): Make sure hosts aren't locked during Service::GetSeverity()
This commit is contained in:
Alexander Aleksandrovič Klimov 2020-08-12 16:18:29 +02:00 committed by GitHub
commit 59b013d700
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();
}
}