diff --git a/include/haproxy/mux_quic-t.h b/include/haproxy/mux_quic-t.h index eafa62d15..bd8b1c31c 100644 --- a/include/haproxy/mux_quic-t.h +++ b/include/haproxy/mux_quic-t.h @@ -92,6 +92,7 @@ struct qcc { #define QC_SF_BLK_MROOM 0x00000004 /* app layer is blocked waiting for room in the qcs.tx.buf */ #define QC_SF_DETACH 0x00000008 /* cs is detached but there is remaining data to send */ #define QC_SF_BLK_SFCTL 0x00000010 /* stream blocked due to stream flow control limit */ +#define QC_SF_DEM_FULL 0x00000020 /* demux blocked on request channel buffer full */ struct qcs { struct qcc *qcc; diff --git a/src/h3.c b/src/h3.c index fe3ae1384..61ea09a72 100644 --- a/src/h3.c +++ b/src/h3.c @@ -223,8 +223,10 @@ static int h3_data_to_htx(struct qcs *qcs, struct buffer *buf, uint64_t len, head = b_head(buf); retry: htx_space = htx_free_data_space(htx); - if (!htx_space) + if (!htx_space) { + qcs->flags |= QC_SF_DEM_FULL; goto out; + } if (len > htx_space) { len = htx_space; @@ -264,7 +266,7 @@ static int h3_decode_qcs(struct qcs *qcs, int fin, void *ctx) if (!b_data(rxbuf)) return 0; - while (b_data(rxbuf)) { + while (b_data(rxbuf) && !(qcs->flags & QC_SF_DEM_FULL)) { uint64_t ftype, flen; struct buffer b; char last_stream_frame = 0; diff --git a/src/mux_quic.c b/src/mux_quic.c index db32de146..db16ca0cf 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -1308,8 +1308,13 @@ static size_t qc_rcv_buf(struct conn_stream *cs, struct buffer *buf, } } - if (ret) + /* TODO QUIC MUX iocb does not treat RX : following wake-up is thus + * useless for the moment. This may causes freezing transfer on POST. + */ + if (ret) { + qcs->flags &= ~QC_SF_DEM_FULL; tasklet_wakeup(qcs->qcc->wait_event.tasklet); + } TRACE_LEAVE(QMUX_EV_STRM_RECV, qcs->qcc->conn, qcs);