Skip to content

Use zero to get free port #116

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

Merged
merged 1 commit into from
Apr 8, 2021
Merged

Conversation

realLiangshiwei
Copy link
Contributor

@realLiangshiwei realLiangshiwei commented Apr 8, 2021

Resolve #115

Locate a free port on the local machine by binding a socket to an IPEndPoint using IPAddress.Any and port 0. The socket will select a free port.

https://github.com/SeleniumHQ/selenium/blob/e9ba4e3f767a671454f01239d4846a853540bbe5/dotnet/src/webdriver/Internal/PortUtilities.cs#L33

image

@JohannesHoppe
Copy link
Member

Wow! It's really that easy?!

@realLiangshiwei
Copy link
Contributor Author

Yes, 🌝 by the way, Have you published the 3.1.1 NuGet package?

image

@JohannesHoppe
Copy link
Member

😞

Screen Shot 2021-04-08 at 10 34 20

@JohannesHoppe
Copy link
Member

The package Mongo2Go 3.1.1 was recently published on NuGet Gallery!

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.

When multiple processes are started, duplicate ports will be bound
2 participants