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

ProcessCheckResult(): Make sure hosts aren't locked during Service::GetSeverity()
This commit is contained in:
Alexander Aleksandrovič Klimov 2020-10-16 10:41:23 +02:00 committed by GitHub
commit 9dd197d0af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();
}
}