fix tuic conn ctx

This commit is contained in:
unknown 2024-04-01 04:52:26 +03:30
parent 316055ea0f
commit c7980887da

View file

@ -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()