Fix: join live threads after joining others
[lttng-tools.git] / src / bin / lttng-relayd / main.c
index 81aa642b1d05a423d603e5e5a39b59afe99bb43c..33aad88ee3e5d0d274790dd4edef675ffeeb06db 100644 (file)
@@ -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);
 
This page took 0.025307 seconds and 5 git commands to generate.