Skip to content

Commit

Permalink
Notification#BeginExecuteNotification(): SetNextNotification() correctly
Browse files Browse the repository at this point in the history
refs #5561
  • Loading branch information
Al2Klimov committed Jan 11, 2019
1 parent b46c3c1 commit 3b20547
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/icinga/notification.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3b20547

Please sign in to comment.