From ddf1e50d93280059348da967a0af1d0a2a5dcbe0 Mon Sep 17 00:00:00 2001 From: Noah Hilverling Date: Tue, 11 Aug 2020 15:24:54 +0200 Subject: [PATCH] ProcessCheckResult(): Make sure hosts aren't locked during Service::GetSeverity() --- lib/icinga/checkable-check.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp index ca5b7ba71..9be429ec0 100644 --- a/lib/icinga/checkable-check.cpp +++ b/lib/icinga/checkable-check.cpp @@ -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(); } }