diff --git a/server/proxy/tcpproxy/userspace.go b/server/proxy/tcpproxy/userspace.go index c579584b613..cd3a29f340b 100644 --- a/server/proxy/tcpproxy/userspace.go +++ b/server/proxy/tcpproxy/userspace.go @@ -74,14 +74,12 @@ func (tp *TCPProxy) Run() error { if tp.MonitorInterval == 0 { tp.MonitorInterval = 5 * time.Minute } + + var eps []string // for logging for _, srv := range tp.Endpoints { addr := net.JoinHostPort(srv.Target, fmt.Sprintf("%d", srv.Port)) tp.remotes = append(tp.remotes, &remote{srv: srv, addr: addr}) - } - - var eps []string - for _, ep := range tp.Endpoints { - eps = append(eps, fmt.Sprintf("%s:%d", ep.Target, ep.Port)) + eps = append(eps, addr) } if tp.Logger != nil { tp.Logger.Info("ready to proxy client requests", zap.Strings("endpoints", eps))