X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fhealth-relayd.c;h=ba996621b0058ca62f94a7d1c4b001a5737b1b2e;hp=8452c1a6c3886f4aaa11b9e71faa7a358d48d254;hb=dd73d57bb95fae31161ca0781108d166082a06f5;hpb=d1f721c52e3810dcb38429cb3beec9f80043aa57 diff --git a/src/bin/lttng-relayd/health-relayd.c b/src/bin/lttng-relayd/health-relayd.c index 8452c1a6c..ba996621b 100644 --- a/src/bin/lttng-relayd/health-relayd.c +++ b/src/bin/lttng-relayd/health-relayd.c @@ -37,13 +37,12 @@ #include #include #include -#include #include #include #include -#include -#include +#include +#include #include #include #include @@ -250,7 +249,7 @@ void *thread_manage_health(void *data) sock = lttcomm_create_unix_sock(health_unix_sock_path); if (sock < 0) { ERR("Unable to create health check Unix socket"); - ret = -1; + err = -1; goto error; } @@ -262,7 +261,7 @@ void *thread_manage_health(void *data) if (ret < 0) { ERR("Unable to set group on %s", health_unix_sock_path); PERROR("chown"); - ret = -1; + err = -1; goto error; } @@ -271,7 +270,7 @@ void *thread_manage_health(void *data) if (ret < 0) { ERR("Unable to set permissions on %s", health_unix_sock_path); PERROR("chmod"); - ret = -1; + err = -1; goto error; } } @@ -409,8 +408,9 @@ restart: new_sock = -1; } -exit: error: + lttng_relay_stop_threads(); +exit: if (err) { ERR("Health error occurred in %s", __func__); }