summaryrefslogtreecommitdiff
path: root/src/socket.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-08-11 02:07:59 +0200
committerLennart Poettering <lennart@poettering.net>2010-08-11 02:07:59 +0200
commit6c073082e7e3859cb6020db8c548325f342b7ba6 (patch)
treedfc968328216e659a66b89f06114f8bf5580b0cf /src/socket.c
parent4927fcae48de061393b3ce9c12d49f80d73fbf1d (diff)
socket: disable GC for pre-allocated per-connection service until it is used
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);