Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
exit_live:
ret = pthread_join(listener_thread, &status);
if (ret != 0) {
exit_live:
ret = pthread_join(listener_thread, &status);
if (ret != 0) {
goto error; /* join error, exit without cleanup */
}
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);
health_error:
utils_close_pipe(health_quit_pipe);