summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/socket.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index 05af8fe9d2..aca20fd106 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -1503,6 +1503,12 @@ static void socket_enter_running(Socket *s, int cfd) {
}
if (!pending) {
+ if (!UNIT_ISSET(s->service)) {
+ log_error_unit(UNIT(s)->id, "%s: service to activate vanished, refusing activation.", UNIT(s)->id);
+ r = -ENOENT;
+ goto fail;
+ }
+
r = manager_add_job(UNIT(s)->manager, JOB_START, UNIT_DEREF(s->service), JOB_REPLACE, true, &error, NULL);
if (r < 0)
goto fail;