Signed-off-by: Paul Woegerer <[email protected]>
---
 liblttng-ust/lttng-ust-comm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c
index 2d3766f..0c7fc65 100644
--- a/liblttng-ust/lttng-ust-comm.c
+++ b/liblttng-ust/lttng-ust-comm.c
@@ -1214,10 +1214,12 @@ restart:
                        if (ret) {
                                ERR("Error handling message for %s socket", 
sock_info->name);
                        } else {
+                               int ctor_passed;
                                struct lttng_session *session;
 
+                               ctor_passed = sock_info->constructor_sem_posted;
                                session = sock_info->session_enabled;
-                               if (session) {
+                               if (ctor_passed && session) {
                                        sock_info->session_enabled = NULL;
                                        lttng_ust_baddr_statedump(session);
                                }
-- 
1.8.4


_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to