mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-05-15 18:39:06 +00:00
385867e82b
Add mutex protection to server.go to prevent race condition when multiple peers connect simultaneously. The shared routingInfo field was being overwritten by concurrent Process() calls, causing connections to fail. - Add sync.RWMutex to protect access to routing info - Only update routing info if not already set or dispatcher changed - Use local copy of routing info in forwardConnection to avoid races - Existing tests pass Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>