Tighten test for removing very old reminders from queue.

This commit is contained in:
Dianne Skoll
2023-12-09 10:25:50 -05:00
parent a49532b9c5
commit d6e66ee1e6

View File

@@ -306,10 +306,11 @@ void HandleQueuedReminders(void)
/* Calculate the next trigger time */
q->tt.nexttime = CalculateNextTime(q);
/* If next time is way in the past because computer has been
/* If trigger time is way in the past because computer has been
suspended or hibernated, remove from queue */
if (q->tt.nexttime != NO_TIME) {
if (q->tt.nexttime * 60L < SystemTime(1) - 60 * MaxLateMinutes) {
if (q->tt.ttime < (SystemTime(1)/60) - MaxLateMinutes &&
q->tt.nexttime < (SystemTime(1)/60) - MaxLateMinutes) {
q->tt.nexttime = NO_TIME;
}
}