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

Socket#addr fails to return the port when binding against 0 #3644

Closed
evanphx opened this issue Feb 4, 2016 · 1 comment
Closed

Socket#addr fails to return the port when binding against 0 #3644

evanphx opened this issue Feb 4, 2016 · 1 comment

Comments

@evanphx
Copy link

evanphx commented Feb 4, 2016

TCPServer.new(0) should bind the server to a random, system assigned port. To find out what that port number actually is, one uses Socket#addr and looks at the 2nd field. On JRuby though, that field is nil.

Failing PR: https://github.com/puma/puma/pull/875/files
Test failure log: https://travis-ci.org/puma/puma/jobs/107033392

@evanphx
Copy link
Author

evanphx commented Feb 4, 2016

Whoops, looks like some bad code on our side.

@evanphx evanphx closed this as completed Feb 4, 2016
@kares kares added this to the Invalid or Duplicate milestone Feb 4, 2016
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

No branches or pull requests

2 participants