-
Notifications
You must be signed in to change notification settings - Fork 38
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
switch listener to tcp4 #42
base: master
Are you sure you want to change the base?
Conversation
LGTM! 🚢 |
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.
Hm, but doesn't this remove support for TCP6? Have you tried doing -listen 1.2.3.6:7979
instead? That should make it listen to TCP4, no?
It doesn't, tried both locally and in mesos.
…On Nov 14, 2017 6:15 AM, "Jens Rantil" ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Hm, but doesn't this remove support for TCP6? Have you tried doing -listen
1.2.3.6:7979 instead? That should make it listen to TCP4, no?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#42 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AWcT8Pe-SoEFy4roaDZeFBSgGnvnvoJZks5s2YRLgaJpZM4QNMmE>
.
|
@@ -81,7 +82,11 @@ func main() { | |||
) | |||
prometheus.DefaultRegisterer.MustRegister(collector) | |||
|
|||
log.Fatal(http.ListenAndServe(c.String("listen"), promhttp.Handler())) | |||
l, err := net.Listen("tcp4", c.String("listen")) |
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.
How about making the first parameter to net.Listen(...)
a flag, too? That would allow someone to use this application with IPv6 if they'd like to.
So as built the listener only listened on ipv6. I am running this as a mesos job and needed to have it listen on a ipv4 interface.