mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
BUG/MEDIUM: mux-quic: wakeup tasklet to close on error
A recent series of commit have been introduced to rework error generation on QUIC MUX side. Now, all MUX/APP functions uses qcc_set_error() to set the flag QC_CF_ERRL on error. Then, this flag is converted to QC_CF_ERRL_DONE with a CONNECTION_CLOSE emission by qc_send(). This has the advantage of centralizing the CONNECTION_CLOSE generation in one place and reduces the link between MUX and quic-conn layer. However, we must now ensure that every qcc_set_error() call is followed by a QUIC MUX tasklet to invoke qc_send(). This was not the case, thus when there is no active transfer, no CONNECTION_CLOSE frame is emitted and the connection remains opened. To fix this, add a tasklet_wakeup() directly in qcc_set_error(). This is a brute force solution as this may be unneeded when already in the MUX tasklet context. However, it is the simplest solution as it is too tedious for the moment to list all qcc_set_error() invocation outside of the tasklet. This must be backported up to 2.7.
This commit is contained in:
parent
58721f2192
commit
da24bcfad3
@ -510,6 +510,15 @@ void qcc_set_error(struct qcc *qcc, int err, int app)
|
||||
|
||||
qcc->flags |= QC_CF_ERRL;
|
||||
qcc->err = app ? quic_err_app(err) : quic_err_transport(err);
|
||||
|
||||
/* TODO
|
||||
* Ensure qc_send() will be conducted to convert QC_CF_ERRL in
|
||||
* QC_CF_ERRL_DONE with CONNECTION_CLOSE frame emission. This may be
|
||||
* unnecessary if we are currently in the MUX tasklet context, but it
|
||||
* is too tedious too not forget a wakeup outside of this function for
|
||||
* the moment.
|
||||
*/
|
||||
tasklet_wakeup(qcc->wait_event.tasklet);
|
||||
}
|
||||
|
||||
/* Open a locally initiated stream for the connection <qcc>. Set <bidi> for a
|
||||
|
Loading…
Reference in New Issue
Block a user