+ if (len == 0) {
+ /*
+ * We received a `LTTNG_VIEWER_METADATA_OK` with a packet
+ * length of 0. This means we must try again. This scenario
+ * arises when a clear command is performed on an lttng session.
+ */
+ BT_COMP_LOGD(
+ "Expecting a metadata packet of size 0. Retry to get a packet from the relay.");
+ goto empty_metadata_packet_retry;
+ }
+