Do not cancel all wakeups prior to setting fallback alarm

This commit is contained in:
2026-08-10 19:18:20 -04:00
parent 6b4548ab07
commit 35c376f81e
+1 -1
View File
@@ -102,7 +102,6 @@ static void glance_reload_callback(AppGlanceReloadSession *session, size_t limit
static bool schedule_alarm(bool is_fallback) { static bool schedule_alarm(bool is_fallback) {
time_t target; time_t target;
WakeupId status; WakeupId status;
wakeup_cancel_all();
if (is_fallback) { if (is_fallback) {
target = time(NULL) + 15; target = time(NULL) + 15;
@@ -117,6 +116,7 @@ static bool schedule_alarm(bool is_fallback) {
if (target <= now) { if (target <= now) {
target += SECONDS_PER_DAY; target += SECONDS_PER_DAY;
} }
wakeup_cancel_all(); // only cancel for main alarm (fallback alarm has short lifetime)
status = wakeup_schedule_simple_robust(target, SECONDS_PER_MINUTE, is_fallback); status = wakeup_schedule_simple_robust(target, SECONDS_PER_MINUTE, is_fallback);
} }
if (status < 0) { if (status < 0) {