From: Mathieu Desnoyers Date: Fri, 25 Jan 2013 15:11:18 +0000 (-0500) Subject: Fix: missing test for lttng_ust_comm_should_quit in lttng-ust-comm.c X-Git-Tag: v2.1.2~14 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=235ebca232ef222c905550a8c787dd76c2e0f338;p=lttng-ust.git Fix: missing test for lttng_ust_comm_should_quit in lttng-ust-comm.c Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 98483cb8..58756931 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -884,6 +884,10 @@ restart: case 0: /* orderly shutdown */ DBG("%s lttng-sessiond has performed an orderly shutdown", sock_info->name); ust_lock(); + if (lttng_ust_comm_should_quit) { + ust_unlock(); + goto quit; + } /* * Either sessiond has shutdown or refused us by closing the socket. * In either case, we don't want to delay construction execution, @@ -921,6 +925,10 @@ restart: } end: ust_lock(); + if (lttng_ust_comm_should_quit) { + ust_unlock(); + goto quit; + } /* Cleanup socket handles before trying to reconnect */ lttng_ust_objd_table_owner_cleanup(sock_info); ust_unlock();