]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Do not use connection struct xprt_ctx too soon
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 31 Jan 2022 09:37:07 +0000 (10:37 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 31 Jan 2022 15:40:23 +0000 (16:40 +0100)
In fact the xprt_ctx of the connection is first stored into quic_conn
struct as soon as it is initialized from qc_conn_alloc_ssl_ctx().
As quic_conn_init_timer() is run after this function, we can associate
the timer context of the timer to the one from the quic_conn struct.

src/xprt_quic.c

index ef4464d04d9235df78ff2ca6e5f192b3605c754a..e1dcd62146707bd452ed485a7f2af5599ce36dcf 100644 (file)
@@ -3687,7 +3687,7 @@ static int quic_conn_init_timer(struct quic_conn *qc)
 
        qc->timer = TICK_ETERNITY;
        qc->timer_task->process = process_timer;
-       qc->timer_task->context = qc->conn->xprt_ctx;
+       qc->timer_task->context = qc->xprt_ctx;
 
        return 1;
 }