]> granicus.if.org Git - icinga2/commitdiff
Notification#BeginExecuteNotification(): SetNextNotification() correctly
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Fri, 11 Jan 2019 17:25:12 +0000 (18:25 +0100)
committerMichael Friedrich <michael.friedrich@icinga.com>
Tue, 19 Mar 2019 10:20:09 +0000 (11:20 +0100)
refs #5561

(cherry picked from commit 3b2054761ad90e71fba82d13cd57d7388f524993)

lib/icinga/notification.cpp

index ba6ca49b4d2bb1a9fd063cf9f83497a5358baa10..09b5c11062bf5360b8b3ac87eaa156c17a0cb10b 100644 (file)
@@ -288,11 +288,9 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
                                        << "': before specified begin time (" << Utility::FormatDuration(timesBegin) << ")";
 
                                /* we need to adjust the next notification time
-                                * to now + begin delaying the first notification
+                                * delaying the first notification
                                 */
-                               double nextProposedNotification = now + timesBegin + 1.0;
-                               if (GetNextNotification() > nextProposedNotification)
-                                       SetNextNotification(nextProposedNotification);
+                               SetNextNotification(checkable->GetLastHardStateChange() + timesBegin + 1.0);
 
                                return;
                        }