Skip to content

TCrossServer - only adopt AListen.LocalPort when the listen succeeded#184

Merged
winddriver merged 1 commit into
winddriver:masterfrom
Vizit0r:fix/crossserver-port-on-success
Jun 25, 2026
Merged

TCrossServer - only adopt AListen.LocalPort when the listen succeeded#184
winddriver merged 1 commit into
winddriver:masterfrom
Vizit0r:fix/crossserver-port-on-success

Conversation

@Vizit0r

@Vizit0r Vizit0r commented May 29, 2026

Copy link
Copy Markdown
Contributor

The Listen callback updated FPort with AListen.LocalPort whenever FPort was 0 -- even when the listen attempt failed -- so FPort was silently overwritten with the LocalPort of a failed/garbage listener.

The line just above already gates AtomicExchange(FStarted, 1) on ASuccess, and the comment immediately above the FPort line says "extract the actual port AFTER LISTEN SUCCEEDS" -- the code just missed the ASuccess check on this branch.

The Listen callback updated FPort with AListen.LocalPort whenever FPort was 0 -- even when the listen attempt failed -- so FPort was
silently overwritten with the LocalPort of a failed/garbage listener.

The line just above already gates AtomicExchange(FStarted, 1) on ASuccess, and the comment immediately above the FPort line says
"extract the actual port AFTER LISTEN SUCCEEDS" -- the code just missed the ASuccess check on this branch.
@winddriver winddriver merged commit 359594c into winddriver:master Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants