- ret = lttng_consumer_on_read_subbuffer_mmap(ctx, stream,
- subbuf_size, padding);
- if (ret != subbuf_size) {
+ ret = lttng_consumer_on_read_subbuffer_mmap(ctx, stream, subbuf_size,
+ padding);
+ /*
+ * The mmap operation should write subbuf_size amount of data when
+ * network streaming or the full padding (len) size when we are _not_
+ * streaming.
+ */
+ if ((ret != subbuf_size && stream->net_seq_idx != -1) ||
+ (ret != len && stream->net_seq_idx == -1)) {