mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-08 16:23:24 -04:00
OPTIM: mux_quic: remove QCS from recv_list on reset
When a RESET_STREAM is received, QCS Rx channel is closed and pending Rx data and buf are cleared without being transmitted to upper stream layer. This patch complements this by removing the QCS from recv_list if present in it. This is a small optimization nothing would be performed for such QCS on qcc_io_recv().
This commit is contained in:
parent
83ae0c250c
commit
a39b1a40ad
1 changed files with 6 additions and 2 deletions
|
|
@ -2333,6 +2333,9 @@ int qcc_recv_reset_stream(struct qcc *qcc, uint64_t id, uint64_t err, uint64_t f
|
|||
goto err;
|
||||
}
|
||||
|
||||
qcs->flags |= QC_SF_SIZE_KNOWN|QC_SF_RECV_RESET;
|
||||
qcs_close_remote(qcs);
|
||||
|
||||
/* RFC 9000 3.2. Receiving Stream States
|
||||
*
|
||||
* An
|
||||
|
|
@ -2340,14 +2343,15 @@ int qcc_recv_reset_stream(struct qcc *qcc, uint64_t id, uint64_t err, uint64_t f
|
|||
* data that was not consumed, and signal the receipt of the
|
||||
* RESET_STREAM.
|
||||
*/
|
||||
qcs->flags |= QC_SF_SIZE_KNOWN|QC_SF_RECV_RESET;
|
||||
qcs_close_remote(qcs);
|
||||
while (!eb_is_empty(&qcs->rx.bufs)) {
|
||||
b = container_of(eb64_first(&qcs->rx.bufs),
|
||||
struct qc_stream_rxbuf, off_node);
|
||||
qcs_free_rxbuf(qcs, b);
|
||||
}
|
||||
|
||||
/* Remove stream from recv_list if present. */
|
||||
LIST_DEL_INIT(&qcs->el_recv);
|
||||
|
||||
out:
|
||||
if (qcc->glitches != prev_glitches && !(qcc->flags & QC_CF_IS_BACK))
|
||||
session_add_glitch_ctr(qcc->conn->owner, qcc->glitches - prev_glitches);
|
||||
|
|
|
|||
Loading…
Reference in a new issue