summaryrefslogtreecommitdiff
path: root/src/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/socket.c b/src/socket.c
index 7c280e0067..23658ac274 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -165,6 +165,7 @@ static int socket_instantiate_service(Socket *s) {
if (r < 0)
return r;
+ u->meta.no_gc = true;
s->service = SERVICE(u);
return 0;
}
@@ -1202,6 +1203,8 @@ static void socket_enter_running(Socket *s, int cfd) {
s->service = NULL;
s->n_accepted ++;
+ service->meta.no_gc = false;
+
unit_choose_id(UNIT(service), name);
free(name);