From 92d2ab76e054b063612dc17c81eb8ef3790e5424 Mon Sep 17 00:00:00 2001 From: Frederic Lecaille Date: Thu, 6 Nov 2025 15:15:43 +0100 Subject: [PATCH] MINOR: quic-be: do not create the mux after handshake completion (for 0-RTT) This is required during connection with 0-RTT support, to prevent two mux creations. Indeed, for 0-RTT sessions, the QUIC mux is already started very soon from connect_server() (src/backend.c). --- src/quic_ssl.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/quic_ssl.c b/src/quic_ssl.c index 4d7798b86..6031cadab 100644 --- a/src/quic_ssl.c +++ b/src/quic_ssl.c @@ -1014,13 +1014,15 @@ int qc_ssl_do_hanshake(struct quic_conn *qc, struct ssl_sock_ctx *ctx) goto err; } - if (conn_create_mux(qc->conn, NULL) < 0) { - TRACE_ERROR("mux creation failed", QUIC_EV_CONN_IO_CB, qc, &state); - goto err; - } + if (!qc_is_conn_ready(qc)) { + if (conn_create_mux(qc->conn, NULL) < 0) { + TRACE_ERROR("mux creation failed", QUIC_EV_CONN_IO_CB, qc, &state); + goto err; + } - /* Wake up MUX after its creation. Operation similar to TLS+ALPN on TCP stack. */ - qc->conn->mux->wake(qc->conn); + /* Wake up MUX after its creation. Operation similar to TLS+ALPN on TCP stack. */ + qc->conn->mux->wake(qc->conn); + } } else { TRACE_PROTO("could not start the mux", QUIC_EV_CONN_IO_CB, qc); -- 2.47.3