Skip to content

Port 0: retry on a random port when UDP cannot share the free TCP port - #4

Merged
steitec merged 2 commits into
mainfrom
windows-udp-bind
Nov 8, 2026
Merged

steitec merged 2 commits into
mainfrom
windows-udp-bind

Conversation

@steitec

@steitec steitec commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Windows CI failed intermittently with WinError 10013 on the UDP bind. Windows hands out free ports sequentially and can block 200 consecutive ports for one protocol, so the ten existing retries stayed inside the block. From the second try on, the server now picks a random port in the dynamic range.

Verified on six Windows runners with 1200 server starts each while walking the port range, no failure.

Windows hands out free ports sequentially and can block 200 consecutive ports for one protocol, so ten requests for any free port all failed with WinError 10013. Measured on six Windows runners.
@steitec
steitec merged commit 8e9d5a7 into main Nov 8, 2026
20 checks passed
@steitec
steitec deleted the windows-udp-bind branch November 8, 2026 14:11
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.

1 participant