From a7e1c8264824c33e330289bfcd1c9422a3f7ccd8 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Wed, 15 Apr 2026 09:37:58 +0200 Subject: [PATCH] MINOR: mux-quic: perform app init in case of early shutdown Adds a qcc_app_init() call in qcc_app_shutdown(). This is necessary if shutdown is performed early, before any invokation of qcc_io_send(). Currently, this should never occur in practice. However, this will become necessary with the new settings tune.quic.fe.stream.max-total. Indeed, when using a very small value, app-ops layer may be closed early in the connection lifetime. --- src/mux_quic.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mux_quic.c b/src/mux_quic.c index 607d9afe9..b812955ec 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -3382,6 +3382,11 @@ static void qcc_app_shutdown(struct qcc *qcc) if (qcc->app_st >= QCC_APP_ST_SHUT) goto out; + if (qcc->app_st < QCC_APP_ST_INIT) { + if (qcc_app_init(qcc)) + goto out; + } + TRACE_STATE("perform graceful shutdown", QMUX_EV_QCC_END, qcc->conn); if (qcc->app_ops && qcc->app_ops->shutdown) { qcc->app_ops->shutdown(qcc->ctx);