Fix: don't send error to sessiond on orderly shutdown
[lttng-tools.git] / src / common / ust-consumer / ust-consumer.c
index 3330ff522cdeea40fd47b1cc8dd60f72aedf7f37..4a7c6db1a69a5ac146f20e9a8b80978ba1f1b1fb 100644 (file)
@@ -1115,12 +1115,12 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
        if (ret != sizeof(msg)) {
                DBG("Consumer received unexpected message size %zd (expects %zu)",
                        ret, sizeof(msg));
-               lttng_consumer_send_error(ctx, LTTCOMM_CONSUMERD_ERROR_RECV_CMD);
                /*
                 * The ret value might 0 meaning an orderly shutdown but this is ok
                 * since the caller handles this.
                 */
                if (ret > 0) {
+                       lttng_consumer_send_error(ctx, LTTCOMM_CONSUMERD_ERROR_RECV_CMD);
                        ret = -1;
                }
                return ret;
This page took 0.023665 seconds and 4 git commands to generate.