Fix TUIC conn context

This commit is contained in:
Mahdi 2024-04-01 10:14:19 +03:30 committed by 世界
parent deab0fcee5
commit 3c842cd21e
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

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