-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix IPv6 advertise addresses #1465
Conversation
} | ||
|
||
// joinIPPort joins ip and port correctly for IPv4 (ip:port) or IPv6 ([ip]:port) | ||
func joinIPPort(ip string, port int) string { |
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.
Why not use https://golang.org/pkg/net/#JoinHostPort ?
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.
Because I didn't think of it :-)
That's the better option, no extra helpers needed (but strconv.Itoa(everyport).
Should I rebase using JoinHostPort?
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.
Cool! Just update your branch with the JoinHostPort, and I think the PR would automatically get updated.
@42wim Thanks for the PR! I have made one comment. Once you update the PR, we can merge this. |
Ok, I updated it (without rebase). |
This also seems to fix #1349 |
Nice thanks! |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Fixes #1318 by making sure it uses the correct syntax for IPv6 addresses.
Adds 2 helper functions