Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use random ports when port number is 0 #79

Merged
merged 5 commits into from Apr 28, 2023
Merged

Conversation

ekzhang
Copy link
Owner

@ekzhang ekzhang commented Apr 28, 2023

With this pull request, we no longer use bind("0.0.0.0", 0) from the operating system to choose an arbitrary available port. Instead, we use our own random number generator and retry 150 times. See comments for an explanation of where this constant comes from.

@ekzhang
Copy link
Owner Author

ekzhang commented Apr 28, 2023

Merging this will be a minor version update, to v0.5.0, since I changed some of the library method signatures.

@ekzhang ekzhang merged commit 0860c6e into main Apr 28, 2023
16 of 17 checks passed
@ekzhang ekzhang deleted the ekzhang/random-ports branch April 28, 2023 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant