From 5bd9b9614f0c0d1daf63b0f0b5850074aba93a46 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Wed, 17 May 2017 10:51:35 -0700 Subject: [PATCH] tcpproxy: display endpoints, not pointers, in ready to proxy string The switch to *net.SRV for endpoints caused the ready string to emit pointers instead of endpoint strings. Fixes #7942 --- proxy/tcpproxy/userspace.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/proxy/tcpproxy/userspace.go b/proxy/tcpproxy/userspace.go index 01e40a24c..807e76a3c 100644 --- a/proxy/tcpproxy/userspace.go +++ b/proxy/tcpproxy/userspace.go @@ -82,7 +82,12 @@ func (tp *TCPProxy) Run() error { tp.remotes = append(tp.remotes, &remote{srv: srv, addr: addr}) } - plog.Printf("ready to proxy client requests to %+v", tp.Endpoints) + eps := []string{} + for _, ep := range tp.Endpoints { + eps = append(eps, fmt.Sprintf("%s:%d", ep.Target, ep.Port)) + } + plog.Printf("ready to proxy client requests to %+v", eps) + go tp.runMonitor() for { in, err := tp.Listener.Accept()