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

[Feature Request] Fix free-port assignment to actually try to connect #550

Closed
cretz opened this issue May 6, 2024 · 0 comments · Fixed by #564
Closed

[Feature Request] Fix free-port assignment to actually try to connect #550

cretz opened this issue May 6, 2024 · 0 comments · Fixed by #564
Labels
enhancement New feature or request

Comments

@cretz
Copy link
Member

cretz commented May 6, 2024

Describe the solution you'd like

We assumed incorrectly that OSs won't give out recently bound ports, but tests reveal it may. Fix https://github.com/temporalio/cli/blob/main/temporalcli/devserver/freeport.go to:

  • Just have one GetFreePort() (int, error) call and none of that extra port-provider stuff
  • Make the GetFreePort() listener also accept a socket connection before closing both the listener and socket and returning the port

Probably don't even need a separate file anymore, this can be a simple single-method utility with the rest of the dev server stuff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant