From d5e1fea6d838b10e98d435c14fcabbde038ad746 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 25 Jan 2013 10:11:18 -0500 Subject: [PATCH] Fix: missing test for lttng_ust_comm_should_quit in lttng-ust-comm.c Signed-off-by: Mathieu Desnoyers --- liblttng-ust/lttng-ust-comm.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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(); -- 2.34.1