]> granicus.if.org Git - icinga2/commitdiff
Fix that the first notification interval is incorrect
authorMichael Friedrich <michael.friedrich@netways.de>
Tue, 2 Aug 2016 16:41:01 +0000 (18:41 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Tue, 2 Aug 2016 16:41:01 +0000 (18:41 +0200)
fixes #12257

lib/icinga/notification.cpp

index 804eb235c915c9c868c8f4271f218bfa65095f11..d9897760c9ffb9199062bb27d10bee27f2a9b13b 100644 (file)
@@ -351,6 +351,10 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
                UpdateNotificationNumber();
                double now = Utility::GetTime();
                SetLastNotification(now);
+
+               if (type == NotificationProblem && GetInterval() > 0)
+                       SetNextNotification(now + GetInterval());
+
                if (type == NotificationProblem)
                        SetLastProblemNotification(now);
        }