From ecb58720122aa9ed7bf4905ba35dba7e271cf10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Thu, 27 May 2021 17:12:36 +0200 Subject: [PATCH] MINOR: quic: Initialize the session before starting the xprt. We must ensure the session and the mux are initialized before starting the xprt. --- src/quic_sock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/quic_sock.c b/src/quic_sock.c index 011b93ad6..aee5ce24b 100644 --- a/src/quic_sock.c +++ b/src/quic_sock.c @@ -57,16 +57,16 @@ int quic_session_accept(struct connection *cli_conn) goto out_free_conn; } - if (conn_xprt_start(cli_conn) < 0) - goto out_free_conn; - sess = session_new(p, l, &cli_conn->obj_type); if (!sess) goto out_free_conn; conn_set_owner(cli_conn, sess, NULL); - if (conn_complete_session(cli_conn) >= 0) + if (conn_complete_session(cli_conn) < 0) + goto out_free_sess; + + if (conn_xprt_start(cli_conn) >= 0) return 1; out_free_sess: