mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-09-16 22:40:27 +00:00
Add context isolation for peer connections
Use core.ToBackgroundDetachedContext to prevent all peer connections from being cancelled when the original request context is cancelled. This ensures peer connections remain independent and stable. Tests pass, no security issues found. Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
This commit is contained in:
co-authored by
RPRX
parent
47a1e042e4
commit
2d37e84d4d
@@ -129,7 +129,7 @@ func (h *Handler) processWireGuard(ctx context.Context, dialer internet.Dialer)
|
||||
},
|
||||
workers: workers,
|
||||
},
|
||||
ctx: ctx,
|
||||
ctx: core.ToBackgroundDetachedContext(ctx),
|
||||
dialer: dialer,
|
||||
reserved: h.conf.Reserved,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user