transport/v2rayxhttp: close UDP connection when HTTP/3 dial fails

This commit is contained in:
embogomolov
2026-07-22 11:41:41 +03:00
parent ea48501b1d
commit 33907d2e23

View File

@@ -348,6 +348,7 @@ func createHTTPClient(ctx context.Context, dest M.Socksaddr, dialer N.Dialer, op
} }
conn, dErr := qtls.DialEarly(ctx, bufio.NewUnbindPacketConn(udpConn), udpConn.RemoteAddr(), tlsConfig, cfg) conn, dErr := qtls.DialEarly(ctx, bufio.NewUnbindPacketConn(udpConn), udpConn.RemoteAddr(), tlsConfig, cfg)
if dErr != nil { if dErr != nil {
_ = udpConn.Close()
return nil, dErr return nil, dErr
} }
if congestionControlFactory != nil { if congestionControlFactory != nil {