diff --git a/src/quic_conn.c b/src/quic_conn.c index 3ed409f7a..c0c128a46 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -743,6 +743,11 @@ struct task *quic_conn_app_io_cb(struct task *t, void *context, unsigned int sta } out: + if ((qc->flags & QUIC_FL_CONN_CLOSING) && qc->mux_state != QC_MUX_READY) { + quic_conn_release(qc); + qc = NULL; + } + TRACE_LEAVE(QUIC_EV_CONN_IO_CB, qc); return t; }