mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-05 02:49:01 +00:00
MINOR: mux-quic: retry send opportunistically for remaining frames
This commit should fix the possible transfer interruption caused by the previous commit. The MUX always retry to send frames if there is remaining data after a send call on the transport layer. This is useful if the transport layer is not blocked on the sending path. In the future, the transport layer should retry by itself the send operation if no blocking condition exists. The MUX layer will always subscribe to retry later if remaining frames are reported which indicate a blocking on the transport layer.
This commit is contained in:
parent
2c71fe58f0
commit
e9c4cc13fc
@ -388,13 +388,24 @@ static int qcs_push_frame(struct qcs *qcs, struct buffer *payload, int fin, uint
|
||||
*/
|
||||
static int qc_send_frames(struct qcc *qcc, struct list *frms)
|
||||
{
|
||||
void *first_frm = NULL;
|
||||
|
||||
retry_send:
|
||||
if (!LIST_ISEMPTY(frms))
|
||||
qc_send_app_pkts(qcc->conn->qc, frms);
|
||||
|
||||
/* TODO Currently, the transport layer is not complete. It might not
|
||||
* try to send all frames even if the Tx buffer is free. In this case
|
||||
* it is necessary to retry immediately instead of subscribing.
|
||||
/* if the frame list is not empty, retry immediatly to send. Remember
|
||||
* the first frame in the list : if the pointer did not advance, it
|
||||
* means the transport layer is blocked.
|
||||
*
|
||||
* TODO implement immediate retry on transport layer. This way on mux
|
||||
* always subscribe if the list is not empty.
|
||||
*/
|
||||
if (!LIST_ISEMPTY(frms) && first_frm != frms->n) {
|
||||
first_frm = frms->n;
|
||||
goto retry_send;
|
||||
}
|
||||
|
||||
if (!LIST_ISEMPTY(frms)) {
|
||||
fprintf(stderr, "%s: remaining frames to send\n", __func__);
|
||||
qcc->conn->xprt->subscribe(qcc->conn, qcc->conn->xprt_ctx,
|
||||
|
Loading…
Reference in New Issue
Block a user