-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Use Socket.ip_address_list to get loopback addresses #1318
Conversation
dc3e298
to
1e8795a
Compare
Ah, I think I get it now. Linking #782. |
I'm also going to link #1022 here, because the original fix here caused that issue, maybe I can satisfy everyone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. When did Socket.ip_address_list
show up? Do we need to be worried about ruby compat?
Looks like it's in 1.9.3, so no. |
Also, JRuby returns the same result as CRuby does here, though it prints the full ipv6 address rather than the short ::1. |
1e8795a
to
d2e9d7d
Compare
This will fix #1167
See JRuby bug
Need some guidance from @evanphx here: is binder supposed to bind to only loopback interfaces by default (as I've done in this PR) or is it supposed to bind to linklocal addresses as well?
Here's what this method returned before (my machine, CRuby):
Now:
Note the omission of an ipv6 link-local interface. The reason I removed it was that there are several other link-local interfaces on my machine which I don't think puma should bind to:
@evanphx if you can clarify the intent here, I'll add a test.