From a2c58a7c8da549da007f51a7e2106ce35b445b5a Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Fri, 3 Dec 2021 14:38:31 +0100 Subject: [PATCH] MEDIUM: mux-quic: subscribe on xprt if remaining data after send The streams data are transferred from the qcs.buf to the qcs.xprt_buf during qc_send. If the xprt_buf is not empty and not all data can be transferred, subscribe the connection on the xprt for sending. The mux will be woken up by the xprt when the xprt_buf will be cleared. This happens on ACK reception. --- src/mux_quic.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mux_quic.c b/src/mux_quic.c index 3b194f687..1f49e010c 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -197,6 +197,11 @@ static int qc_send(struct qcc *qcc) fprintf(stderr, "%s ret=%d\n", __func__, ret); qcs->tx.offset += ret; + + if (b_data(buf)) { + qcc->conn->xprt->subscribe(qcc->conn, qcc->conn->xprt_ctx, + SUB_RETRY_SEND, &qcc->wait_event); + } } node = eb64_next(node); }