Fix: stop lttng-relayd threads on health thread error
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 20 Oct 2016 19:45:42 +0000 (15:45 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 20 Oct 2016 19:45:42 +0000 (15:45 -0400)
The lttng-relayd health thread may fail to initialize for
a variety of reason (notably, a too long unix domain socket
address), which will cause it to never notify that it is
ready.

In such circumstances, the lttng-relayd command, in background or
daemonize mode, will never return as the daemon's "readyness"
will never be signaled.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/health-relayd.c

index c6dd2e8523f3466abb81d97356b1c13ce1f71273..cff6c6e72889a27e49820c29e9893e04dadbfe3b 100644 (file)
@@ -409,8 +409,9 @@ restart:
                new_sock = -1;
        }
 
-exit:
 error:
+       lttng_relay_stop_threads();
+exit:
        if (err) {
                ERR("Health error occurred in %s", __func__);
        }
This page took 0.026872 seconds and 4 git commands to generate.