mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-25 23:20:45 +00:00
MINOR: mux-quic: report error on stream-endpoint earlier
A RESET_STREAM is emitted in several occasions : - protocol error during HTTP/3.0 parsing - STOP_SENDING reception In both cases, if a stream-endpoint is attached we must set its ERR flag. This was correctly done but after some delay as it was only when the RESET_STREAM was emitted. Change this to set the ERR flag as soon as one of the upper cases has been encountered. This should help to release faster streams in error. This should be backported up to 2.7.
This commit is contained in:
parent
37d78997ae
commit
152beeec34
@ -883,6 +883,13 @@ static int qcc_decode_qcs(struct qcc *qcc, struct qcs *qcs)
|
||||
TRACE_ERROR("decoding error", QMUX_EV_QCS_RECV, qcc->conn, qcs);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (qcs->flags & QC_SF_TO_RESET) {
|
||||
if (qcs_sc(qcs) && !se_fl_test(qcs->sd, SE_FL_ERROR|SE_FL_ERR_PENDING)) {
|
||||
se_fl_set_error(qcs->sd);
|
||||
qcs_alert(qcs);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
TRACE_DATA("ignore read on stream", QMUX_EV_QCS_RECV, qcc->conn, qcs);
|
||||
@ -1398,6 +1405,12 @@ int qcc_recv_stop_sending(struct qcc *qcc, uint64_t id, uint64_t err)
|
||||
*/
|
||||
qcc_reset_stream(qcs, err);
|
||||
|
||||
/* Report send error to stream-endpoint layer. */
|
||||
if (qcs_sc(qcs)) {
|
||||
se_fl_set_error(qcs->sd);
|
||||
qcs_alert(qcs);
|
||||
}
|
||||
|
||||
if (qcc_may_expire(qcc) && !qcc->nb_hreq)
|
||||
qcc_refresh_timeout(qcc);
|
||||
|
||||
@ -1816,11 +1829,6 @@ static int qcs_send_reset(struct qcs *qcs)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (qcs_sc(qcs)) {
|
||||
se_fl_set_error(qcs->sd);
|
||||
qcs_alert(qcs);
|
||||
}
|
||||
|
||||
qcs_close_local(qcs);
|
||||
qcs->flags &= ~QC_SF_TO_RESET;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user