Fix: join live threads after joining others
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 9 Oct 2013 15:57:26 +0000 (11:57 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 9 Oct 2013 15:59:09 +0000 (11:59 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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.02832 seconds and 5 git commands to generate.