From 3c842cd21e2c27bd8215842bd91ca0a3d67ec0fe Mon Sep 17 00:00:00 2001 From: Mahdi <80265960+Mahdi-zarei@users.noreply.github.com> Date: Mon, 1 Apr 2024 10:14:19 +0330 Subject: [PATCH] Fix TUIC conn context --- tuic/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tuic/client.go b/tuic/client.go index bee410c..1ad12d3 100644 --- a/tuic/client.go +++ b/tuic/client.go @@ -106,9 +106,9 @@ func (c *Client) offerNew(ctx context.Context) (*clientQUICConnection, error) { } var quicConn quic.Connection if c.zeroRTTHandshake { - quicConn, err = qtls.DialEarly(ctx, bufio.NewUnbindPacketConn(udpConn), udpConn.RemoteAddr(), c.tlsConfig, c.quicConfig) + quicConn, err = qtls.DialEarly(c.ctx, bufio.NewUnbindPacketConn(udpConn), udpConn.RemoteAddr(), c.tlsConfig, c.quicConfig) } else { - quicConn, err = qtls.Dial(ctx, bufio.NewUnbindPacketConn(udpConn), udpConn.RemoteAddr(), c.tlsConfig, c.quicConfig) + quicConn, err = qtls.Dial(c.ctx, bufio.NewUnbindPacketConn(udpConn), udpConn.RemoteAddr(), c.tlsConfig, c.quicConfig) } if err != nil { udpConn.Close()