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

resolve zero port on all interfaces, not just localhost; GetPort rena… #8

Closed
wants to merge 1 commit into from

Conversation

aka-rider
Copy link

@aka-rider aka-rider commented Feb 1, 2019

Hi.
Thanks for the useful library / tool.

The main reasons for this pull request are:

  • Ask for a free port not only on a localhost interface but on all of them "localhost:0" -> ":0"
  • Replace defer l.Close() with l.Close() - I want to shutdown the listener as fast as possible to avoid "bind: address already in use"

GetPort was market as deprecated for 1 year, so I thought it wouldn't be much harm to rename it into MustGetFreePort according to the go naming convention. It's nice to have such function for usage in tests.

freeport.go Outdated Show resolved Hide resolved
…med to MustGetFreePort (according to go naming convention)
@slimsag
Copy link

slimsag commented Aug 20, 2020

I have made a hard fork of this project here with this PR included: https://github.com/slimsag/freeport

alessio pushed a commit to cosmos/cosmos-sdk that referenced this pull request Mar 10, 2021
Replace defer l.Close() with l.Close() to shutdown the listener
as fast as possible to avoid the "bind: address already in use"
error that so often occurs in CI build.

From: phayes/freeport#8
Reference: #6671
mergify bot pushed a commit to cosmos/cosmos-sdk that referenced this pull request Mar 15, 2021
Replace defer l.Close() with l.Close() to shutdown the listener
as fast as possible to avoid the "bind: address already in use"
error that so often occurs in CI build.

From: phayes/freeport#8
Reference: #6671

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
daeMOn63 pushed a commit to fetchai/cosmos-sdk that referenced this pull request Aug 19, 2021
Replace defer l.Close() with l.Close() to shutdown the listener
as fast as possible to avoid the "bind: address already in use"
error that so often occurs in CI build.

From: phayes/freeport#8
Reference: #6671

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
daeMOn63 pushed a commit to fetchai/cosmos-sdk that referenced this pull request Aug 20, 2021
Replace defer l.Close() with l.Close() to shutdown the listener
as fast as possible to avoid the "bind: address already in use"
error that so often occurs in CI build.

From: phayes/freeport#8
Reference: #6671

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
daeMOn63 pushed a commit to fetchai/cosmos-sdk that referenced this pull request Mar 1, 2022
Replace defer l.Close() with l.Close() to shutdown the listener
as fast as possible to avoid the "bind: address already in use"
error that so often occurs in CI build.

From: phayes/freeport#8
Reference: #6671

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
@aka-rider aka-rider closed this Dec 22, 2022
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.

None yet

4 participants