mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-23 07:43:29 +03:00
transport/v2rayxhttp: close UDP connection when HTTP/3 dial fails
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user