timer: don't run service immediately after restart of a timer

When a timer is restarted, don't reset the last_trigger field.
This prevents the timer from triggering immediately.

Fixes: #31231
This commit is contained in:
Lukas Nykryn
2025-09-09 15:24:22 +02:00
committed by Frantisek Sumsal
parent f4c3c107d9
commit 3fc44a0f68

View File

@@ -664,8 +664,6 @@ static int timer_start(Unit *u) {
if (r < 0)
return r;
t->last_trigger = DUAL_TIMESTAMP_NULL;
/* Reenable all timers that depend on unit activation time */
LIST_FOREACH(value, v, t->values)
if (v->base == TIMER_ACTIVE)