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
2026-08-31 23:59:04 +00:00
committed by GitHub
parent 5e245b082e
commit 2776ea6d74
+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())