Merge pull request #6896 from Icinga/bugfix/notification-delay-5561

Notification#BeginExecuteNotification(): SetNextNotification() correctly
This commit is contained in:
Michael Friedrich 2019-02-22 09:27:59 +01:00 committed by GitHub
commit 30d98b49eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -290,11 +290,9 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
<< notificationName << "': 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;
}