]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-quic: perform app init in case of early shutdown
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 15 Apr 2026 07:37:58 +0000 (09:37 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 15 Apr 2026 12:34:13 +0000 (14:34 +0200)
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

index 607d9afe96bd714c3d247fe17f6d074b17f6ab2a..b812955ec9ac9704b1965dba175b0a9e3121e367 100644 (file)
@@ -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);