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.
This commit is contained in:
Amaury Denoyelle 2021-12-03 14:38:31 +01:00
parent a3f222dc1e
commit a2c58a7c8d

View 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);
}