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.2.0-rc1~90 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;h=d5e1fea6d838b10e98d435c14fcabbde038ad746;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();