]> 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 16:04:41 +0000 (18:04 +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)
(cherry picked from commit c058ff41cb24a1cce7bbe574f072bf3c35533913)

src/core/timer.c

index 39a8c5c6b1d3bf78af99a85b6cd3944ea823a548..71923ee4fd7eca057de01a0f79975985d914ef88 100644 (file)
@@ -654,8 +654,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)