Fix logic bug that would sometimes fail to send a queue update message to controlling process.

This commit is contained in:
Dianne Skoll
2024-03-16 13:36:24 -04:00
parent d5a86f3e4f
commit 6586fae3eb

View File

@@ -495,10 +495,16 @@ void HandleQueuedReminders(void)
suspended or hibernated, remove from queue */
if (q->tt.ttime < MinutesPastMidnight(1) - MaxLateMinutes &&
q->tt.nexttime < MinutesPastMidnight(1) - MaxLateMinutes) {
del_reminder((unsigned long) q);
if (IsServerMode()) {
print_num_queued();
}
q->tt.nexttime = NO_TIME;
}
}
/* If queued reminder has expired, actually remove it from queue
and update status */
if (q->tt.nexttime == NO_TIME) {
del_reminder((unsigned long) q);
if (IsServerMode()) {
print_num_queued();
}
}
}