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

IPv6 address literals are not handled well #59

Closed
thwarted opened this issue Aug 13, 2014 · 0 comments · Fixed by #60
Closed

IPv6 address literals are not handled well #59

thwarted opened this issue Aug 13, 2014 · 0 comments · Fixed by #60

Comments

@thwarted
Copy link
Contributor

If the servers config option includes IPv6 address literals like '[::1]:11300' or [fe80::800:27ff:fe00:0%eth0]:11300, beanstalk_console can not connect. This is because BeanstalkInterface __construct is naive in parsing the server address. I hacked up a serious kludge to take the last element of the exploded result as the port, to verify that it would work, but that code is too ugly to productionize.

It may be better to take URL-like values as the server list, like beanstalk://host:port/ (this is what the backburner library does. Then parse_url can be used to extract the necessary components unambiguously. Maybe maintain backwards compatibility by using parse_url if the string starts with beanstalk://?

Note that it has no trouble connecting over IPv6 if the address or name can be parsed correctly (specifically, giving a name that only resolves to an IPv6 address or AAAA records does work).

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 a pull request may close this issue.

1 participant