This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 683
fix: make port 0
bind to any available port
#4070
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
davidmurdoch
requested review from
jeffsmale90,
MicaiahReid and
tenthirtyone
and removed request for
jeffsmale90
December 21, 2022 18:31
davidmurdoch
commented
Dec 21, 2022
davidmurdoch
commented
Dec 21, 2022
davidmurdoch
commented
Dec 21, 2022
davidmurdoch
commented
Dec 21, 2022
davidmurdoch
commented
Dec 21, 2022
davidmurdoch
commented
Dec 21, 2022
davidmurdoch
commented
Dec 21, 2022
davidmurdoch
changed the title
fix: allow port 0 to bind to any available port
fix: make port Dec 21, 2022
0
bind to any available port
jeffsmale90
suggested changes
Dec 21, 2022
MicaiahReid
suggested changes
Dec 21, 2022
Co-authored-by: Micaiah Reid <[email protected]>
Co-authored-by: Micaiah Reid <[email protected]>
davidmurdoch
force-pushed
the
support-port-0
branch
from
January 6, 2023 18:47
e31067a
to
8925f6d
Compare
davidmurdoch
commented
Jan 6, 2023
davidmurdoch
changed the title
fix: make port
is this a fix or a feat?: make port Jan 6, 2023
0
bind to any available port0
bind to any available port
MicaiahReid
approved these changes
Jan 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a fix because we claimed to support binding to port 0.
jeffsmale90
approved these changes
Jan 8, 2023
davidmurdoch
changed the title
is this a fix or a feat?: make port
fix: make port Jan 10, 2023
0
bind to any available port0
bind to any available port
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Specifying a port of
0
is a way to tell a server that you want the Operating System to let you bind to any open port. Ganache claimed to support binding to port 0, but would rudely yell at you if you tried:Port should be >= 0 and < 65536. Received 0
🤦! This PR rights our wrongs.Using port
0
is useful when you don't care which port you bind to, you just want an open port.You can use port
0
in a few ways:On the cli:
In detach mode:
and programmatically:
Fixes #2643 and #3805