]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
timer: don't run service immediately after restart of a timer
authorLukas Nykryn <lnykryn@redhat.com>
Tue, 9 Sep 2025 13:24:22 +0000 (15:24 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 13 Oct 2025 14:59:40 +0000 (16:59 +0200)
When a timer is restarted, don't reset the last_trigger field.
This prevents the timer from triggering immediately.

Fixes: #31231
(cherry picked from commit 3fc44a0f68412b649e16f12ff2f97a36c615457d)

src/core/timer.c

index a45e0c393fe634b8c1620525390a801ea3b05330..2e0a8a17c3da85c81046b92fdfbbd29a37639c4d 100644 (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)