From: Jérémie Galarneau Date: Mon, 23 Apr 2018 20:36:25 +0000 (-0400) Subject: Fix: agent may not be ready on launch X-Git-Tag: v2.10.4~6 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=919b1ca309361b9e87a80514daf96825a4ac8fa7;p=lttng-tools.git Fix: agent may not be ready on launch Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/agent-thread.c b/src/bin/lttng-sessiond/agent-thread.c index 3a46c0fb9..ddc6c7e62 100644 --- a/src/bin/lttng-sessiond/agent-thread.c +++ b/src/bin/lttng-sessiond/agent-thread.c @@ -248,6 +248,7 @@ void *agent_thread_manage_registration(void *data) } reg_sock = init_tcp_socket(); + sessiond_notify_ready(); if (!reg_sock) { goto error_tcp_socket; } diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 5019b1c9c..602db1ee4 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -291,7 +291,7 @@ struct lttng_ht *agent_apps_ht_by_sock = NULL; * NR_LTTNG_SESSIOND_READY must match the number of calls to * sessiond_notify_ready(). */ -#define NR_LTTNG_SESSIOND_READY 4 +#define NR_LTTNG_SESSIOND_READY 5 int lttng_sessiond_ready = NR_LTTNG_SESSIOND_READY; int sessiond_check_thread_quit_pipe(int fd, uint32_t events)