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

find_port: avoid infinite loop #811

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

utkarshayachit
Copy link
Contributor

If all ports in chosen port range were taken, find_port had the tendency to block. This fix updates the code to avoid this and instead attempt to find a port by looping over the port range for a fixed number of retries.

If all ports in chosen port range were taken, `find_port` had the
tendency to block. This fix updates the code to avoid this and instead
attempt to find a port by looping over the port range for a fixed number
of retries.
@johrstrom johrstrom self-requested a review July 31, 2023 15:32
Copy link
Contributor

@johrstrom johrstrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the bug fix! Unfortunately we don't have strong test cases for this, but I was able to pull the modification into a simple bash script and test it and it's good.

@johrstrom johrstrom merged commit cd3faaf into OSC:master Jul 31, 2023
3 checks passed
@utkarshayachit
Copy link
Contributor Author

thanks for the quick merge! Working on a few more cleanups for issues we encountered under AzHOP. Just wanted to introduce myself to the dev team and familiarize myself with the workflow with this small PR :).

@utkarshayachit utkarshayachit deleted the avoid_inifinite_loop branch July 31, 2023 15:38
@johrstrom
Copy link
Contributor

Well hello there! PRs welcome - that's pretty much the policy. I'm working on a 3.0.2 patch release, so i'll try to get this in there.

@johrstrom johrstrom mentioned this pull request Nov 28, 2023
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

2 participants