Fix: send the streams sent message after metadata
[lttng-tools.git] / src / common / ust-consumer / ust-consumer.c
index af3aca0a5dfad074ba163a875770244af13e475b..bdabb5e49fcda0e44d6c65018efc0b4f296c6730 100644 (file)
@@ -438,17 +438,6 @@ static int send_sessiond_channel(int sock,
                                net_seq_idx = stream->net_seq_idx;
                        }
                }
-               ret = consumer_send_relayd_streams_sent(net_seq_idx);
-               if (ret < 0) {
-                       /*
-                        * Flag that the relayd was the problem here probably due to a
-                        * communicaton error on the socket.
-                        */
-                       if (relayd_error) {
-                               *relayd_error = 1;
-                       }
-                       ret_code = LTTNG_ERR_RELAYD_CONNECT_FAIL;
-               }
        }
 
        /* Inform sessiond that we are about to send channel and streams. */
@@ -769,6 +758,12 @@ static int setup_metadata(struct lttng_consumer_local_data *ctx, uint64_t key)
                        ret = LTTCOMM_CONSUMERD_ERROR_METADATA;
                        goto error;
                }
+               ret = consumer_send_relayd_streams_sent(
+                               metadata->metadata_stream->net_seq_idx);
+               if (ret < 0) {
+                       ret = LTTCOMM_CONSUMERD_RELAYD_FAIL;
+                       goto error;
+               }
        }
 
        ret = send_streams_to_thread(metadata, ctx);
This page took 0.0232 seconds and 4 git commands to generate.