MEDIUM: mux-quic: defer stream shut if remaining tx data
Defer the shutting of a qcs if there is still data in its tx buffers. In
this case, the conn_stream is closed but the qcs is kept with a new flag
QC_SF_DETACH.
On ACK reception, the xprt wake up the shut_tl tasklet if the stream is
flagged with QC_SF_DETACH. This tasklet is responsible to free the qcs
and possibly the qcc when all bidirectional streams are removed.
diff --git a/src/xprt_quic.c b/src/xprt_quic.c
index 455c83b..130652f 100644
--- a/src/xprt_quic.c
+++ b/src/xprt_quic.c
@@ -1210,6 +1210,9 @@
eb64_insert(&qcs->tx.acked_frms, &strm->offset);
}
stream_acked |= qcs_try_to_consume(qcs);
+
+ if (qcs->flags & QC_SF_DETACH)
+ tasklet_wakeup(qcs->shut_tl);
}
break;
default: