From c6b0a8942f792c9fae204eee8ac60042573a8726 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 11 Jun 2024 19:06:51 +0200 Subject: Merging upstream version 3.0.1. Signed-off-by: Daniel Baumann --- src/mux_quic.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/mux_quic.c') diff --git a/src/mux_quic.c b/src/mux_quic.c index ae504ee..8272b93 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -3046,8 +3046,17 @@ static size_t qmux_strm_done_ff(struct stconn *sc) qcs->flags |= QC_SF_FIN_STREAM; } - if (!(qcs->flags & QC_SF_FIN_STREAM) && !sd->iobuf.data) + if (!(qcs->flags & QC_SF_FIN_STREAM) && !sd->iobuf.data) { + TRACE_STATE("no data sent", QMUX_EV_STRM_SEND, qcs->qcc->conn, qcs); + + /* There is nothing to forward and the SD was blocked after a + * successful nego by the producer. We can try to release the + * TXBUF to retry. In this case, the TX buf MUST exist. + */ + if ((qcs->sd->iobuf.flags & IOBUF_FL_FF_WANT_ROOM) && !qcc_release_stream_txbuf(qcs)) + qcs->sd->iobuf.flags &= ~(IOBUF_FL_FF_BLOCKED|IOBUF_FL_FF_WANT_ROOM); goto end; + } data += sd->iobuf.offset; total = qcs->qcc->app_ops->done_ff(qcs); -- cgit v1.2.3