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

fix: only bind to webserver port if the user did not specify one explicitly #3998

Closed
wants to merge 1 commit into from

Conversation

mraszyk
Copy link
Contributor

@mraszyk mraszyk commented Nov 15, 2024

This PR aims to fix spurious errors of the form

Error: Failed to get frontend address.
Caused by: Failed to find available socket address
Caused by: Failed to bind socket to 127.0.0.1:8080.
Caused by: Address already in use (os error 48)

by only binding to a webserver port if the user did not specify one explicitly (port is equal to zero) and thus a free port is grabbed by the system.

@mraszyk mraszyk requested a review from a team as a code owner November 15, 2024 15:07
@mraszyk
Copy link
Contributor Author

mraszyk commented Nov 15, 2024

The approach from this PR isn't robust against users actually trying to dfx start with the same webserver port.

@mraszyk mraszyk closed this Nov 15, 2024
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