diff --git a/lib/icinga/service.cpp b/lib/icinga/service.cpp index 5a94b96db..bb49c00ee 100644 --- a/lib/icinga/service.cpp +++ b/lib/icinga/service.cpp @@ -312,10 +312,12 @@ void Service::SetAcknowledgementExpiry(double timestamp) */ void Service::AcknowledgeProblem(AcknowledgementType type, double expiry) { - ObjectLock olock(this); + { + ObjectLock olock(this); - SetAcknowledgement(type); - SetAcknowledgementExpiry(expiry); + SetAcknowledgement(type); + SetAcknowledgementExpiry(expiry); + } RequestNotifications(NotificationAcknowledgement, GetLastCheckResult()); }