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

retry unavailable ports rather than hard fail #394

Closed
wants to merge 1 commit into from

Conversation

titusfortner
Copy link
Member

I regularly have issues with a port being briefly unavailable. A short sleep fixes it.

This is a stack trace example: https://gist.github.com/titusfortner/6069aed4def5c1ea0db9
I've seen it happen with multiple wire calls, not just getCurrentWindowHandle

I've been running all of my tests with this monkey patched for the past month and have had no problems.

@andreastt
Copy link
Member

LGTM. @titusfortner, did you sign the CLA?

This situation might occur when we exhaust the temporary port range on a machine with many TCP connections. It takes some time for the temporary sockets to be returned to the reusable pool, and in that short timespan there may be race conditions.

@titusfortner
Copy link
Member Author

Yes, I have, thanks.
On Apr 3, 2015 5:19 AM, "Andreas Tolfsen" notifications@github.com wrote:

LGTM. @titusfortner https://github.com/titusfortner, did you sign the
CLA?

This situation might occur when we exhaust the temporary port range on a
machine with many TCP connections. It takes some time for the temporary
sockets to be returned to the reusable pool, and in that short timespan
there may be race conditions.


Reply to this email directly or view it on GitHub
#394 (comment).

@andreastt
Copy link
Member

Thank you for the patch! I've integrated it as f0881e3.

@andreastt andreastt closed this Apr 3, 2015
andreastt added a commit that referenced this pull request Apr 3, 2015
@titusfortner titusfortner deleted the eaddr_not_avail branch July 2, 2015 01:43
topherbullock pushed a commit to topherbullock/selenium that referenced this pull request Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants