From: Frederic Lecaille Date: Tue, 23 Jun 2026 08:23:47 +0000 (+0200) Subject: fix -m with QMUX X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/NGINX-js-1660x332.png%20%22NGINX%20JavaScript%20Banner%22?a=commitdiff_plain;h=refs%2Fheads%2F20260319-haload;p=haproxy.git fix -m with QMUX This is the same fix as the previous one for QUIC. --- diff --git a/include/haproxy/haload.h b/include/haproxy/haload.h index c75e4e027..b3ce81a4f 100644 --- a/include/haproxy/haload.h +++ b/include/haproxy/haload.h @@ -15,6 +15,7 @@ struct hld_path { struct hld_url_cfg { int ssl; int is_quic; + int is_h3; int h2c; char *addr; char *raw_addr; // used only to set the host header value diff --git a/src/haload.c b/src/haload.c index b63629651..ae7489fbc 100644 --- a/src/haload.c +++ b/src/haload.c @@ -1259,11 +1259,12 @@ struct task *hld_strm_task(struct task *t, void *context, unsigned int state) /* Note that the user task will release all the expired streams * attached to it. */ - /* Note that for QUIC, the number of available streams is not + /* Note that for QUIC and QMUX, the number of available streams is not * incremented as soon as a stream is completed (fin=1). * For H1, here this number is always 0. */ - if (!url->cfg->is_quic || hs->conn->mux->avail_streams(hs->conn)) + if ((!url->cfg->is_quic && !url->cfg->is_h3) || + hs->conn->mux->avail_streams(hs->conn)) task_wakeup(usr->task, TASK_WOKEN_IO); LIST_DELETE(&hs->list); diff --git a/src/haload_init.c b/src/haload_init.c index b5f548f13..8fa56d331 100644 --- a/src/haload_init.c +++ b/src/haload_init.c @@ -12,7 +12,7 @@ static int hld_debug; struct hld_url_cfg *hld_url_cfgs; char *srv_opts, *tls_ciphers, *tls_ciphersuites, *tls_curves, *alpn; -int h2c; +int h2c, is_h3; static void hld_usage(char *name, int argc) { @@ -260,6 +260,7 @@ static struct hld_url_cfg *hld_alloc_url(char *url) hld_url_cfg->ssl = ssl; hld_url_cfg->is_quic = is_quic; + hld_url_cfg->is_h3 = is_h3; hld_url_cfg->h2c = h2c; hld_url_cfg->addr = addr; hld_url_cfg->raw_addr = raw_addr; @@ -470,26 +471,31 @@ void haproxy_init_args(int argc, char **argv) strcmp(opt, "h0") == 0) { alpn = "hq-interop"; h2c = 0; + is_h3 = 0; } else if (strcmp(opt, "1") == 0 || strcmp(opt, "h1") == 0) { alpn = "http/1.1"; h2c = 0; + is_h3 = 0; } else if (strcmp(opt, "2") == 0 || strcmp(opt, "h2") == 0) { alpn = "h2"; h2c = 0; + is_h3 = 0; } else if (strcmp(opt, "2c") == 0 || strcmp(opt, "h2c") == 0) { alpn = NULL; h2c = 1; + is_h3 = 0; } else if (strcmp(opt, "3") == 0 || strcmp(opt, "h3") == 0) { alpn = "h3"; h2c = 0; + is_h3 = 1; } else if (*opt == 'd') { opt++;