Skip to content

Commit 8f684a9

Browse files
committed
MEDIUM: mux_quic: force connection closure on timeout
1 parent e448aa7 commit 8f684a9

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/mux_quic.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3719,16 +3719,20 @@ static struct task *qcc_timeout_task(struct task *t, void *ctx, unsigned int sta
37193719
/* Mark timeout as triggered by setting task to NULL. */
37203720
qcc->task = NULL;
37213721

3722+
/* Flag the connection on error. This is necessary to prevent BUG_ON()
3723+
* failure when releasing prematurely request streams with prepared data
3724+
* not fully sent.
3725+
*/
3726+
qcc->flags |= QC_CF_ERR_CONN;
3727+
37223728
/* TODO depending on the timeout condition, different shutdown mode
37233729
* should be used. For http keep-alive or disabled proxy, a graceful
37243730
* shutdown should occurs. For all other cases, an immediate close
37253731
* seems legitimate.
37263732
*/
3727-
if (qcc_is_dead(qcc)) {
3728-
TRACE_STATE("releasing dead connection", QMUX_EV_QCC_WAKE, qcc->conn);
3729-
qcc_app_shutdown(qcc);
3730-
qcc_release(qcc);
3731-
}
3733+
qcc_app_shutdown(qcc);
3734+
TRACE_USER("releasing connection on timeout", QMUX_EV_QCC_WAKE, qcc->conn);
3735+
qcc_release(qcc);
37323736

37333737
out:
37343738
TRACE_LEAVE(QMUX_EV_QCC_WAKE);

0 commit comments

Comments
 (0)