X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fmain.c;h=33aad88ee3e5d0d274790dd4edef675ffeeb06db;hb=51a9e1c7f7fd48e2b53e258aee269a69cb8b59d3;hp=81aa642b1d05a423d603e5e5a39b59afe99bb43c;hpb=65931c8b1d91fd946a2e117a5a1f61eba0b5087a;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 81aa642b1..33aad88ee 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -2634,8 +2634,6 @@ int main(int argc, char **argv) goto exit_live; } - live_stop_threads(); - exit_live: ret = pthread_join(listener_thread, &status); if (ret != 0) { @@ -2664,6 +2662,11 @@ exit_dispatcher: goto error; /* join error, exit without cleanup */ } + /* + * Stop live threads only after joining other threads. + */ + live_stop_threads(); + health_error: utils_close_pipe(health_quit_pipe);