]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: mux-quic: subscribe on xprt if remaining data after send
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 3 Dec 2021 13:38:31 +0000 (14:38 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 7 Dec 2021 14:44:45 +0000 (15:44 +0100)
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

index 3b194f687fc973265ebdd9098a4b94fc00f06bab..1f49e010c80f97b57e14b340d1faaf20c35e2b1e 100644 (file)
@@ -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);
        }