diff options
Diffstat (limited to 'src/core/job.c')
-rw-r--r-- | src/core/job.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/job.c b/src/core/job.c index 835cfe173b..dc4f44150c 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -1060,15 +1060,15 @@ int job_coldplug(Job *j) { if (r < 0) return r; + if (j->state == JOB_WAITING) + job_add_to_run_queue(j); + if (j->begin_usec == 0 || j->unit->job_timeout == 0) return 0; if (j->timer_event_source) j->timer_event_source = sd_event_source_unref(j->timer_event_source); - if (j->state == JOB_WAITING) - job_add_to_run_queue(j); - r = sd_event_add_time( j->manager->event, &j->timer_event_source, |