SS2022 outbound: Close connection to server on early returns (#6698)

https://github.com/XTLS/Xray-core/pull/6698#issuecomment-5468662565
This commit is contained in:
Jorik_Smith authored and nerpa committed 2026-09-13 10:50:32 +03:00
1 parent 77f27f9060
commit b40e22e68b
1 file changed
+1
+1
View File
@@ -82,6 +82,7 @@ func (o *Outbound) Process(ctx context.Context, link *transport.Link, dialer int
if err != nil {
return errors.New("failed to connect to server").Base(err)
}
defer connection.Close()
if session.TimeoutOnlyFromContext(ctx) {
ctx, _ = context.WithCancel(context.Background())