Merge pull request #116 from embogomolov/fix/xhttp-h3-udp-socket-leak

transport/v2rayxhttp: close UDP connection when HTTP/3 dial fails
This commit is contained in:
Shtorm
2026-07-22 13:35:15 +03:00
committed by GitHub

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)
if dErr != nil {
_ = udpConn.Close()
return nil, dErr
}
if congestionControlFactory != nil {