summaryrefslogtreecommitdiff
path: root/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'service.c')
-rw-r--r--service.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/service.c b/service.c
index 21e8436661..ddf03bbf12 100644
--- a/service.c
+++ b/service.c
@@ -1461,11 +1461,12 @@ static void service_enter_restart(Service *s) {
int r;
assert(s);
+ service_enter_dead(s, true, false);
+
if ((r = manager_add_job(UNIT(s)->meta.manager, JOB_START, UNIT(s), JOB_FAIL, false, NULL)) < 0)
goto fail;
log_debug("%s scheduled restart job.", unit_id(UNIT(s)));
- service_enter_dead(s, true, false);
return;
fail: