From 701bb9af19d9773896eb360c921a4c7fb6a2a2ea Mon Sep 17 00:00:00 2001 From: yourchanges Date: Thu, 12 Feb 2015 18:37:26 +0800 Subject: [PATCH] Move the redirect url perfer to volume server's PublicUrl --- go/topology/data_node.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go/topology/data_node.go b/go/topology/data_node.go index 2d0a093cc..c7d04d953 100644 --- a/go/topology/data_node.go +++ b/go/topology/data_node.go @@ -87,6 +87,9 @@ func (dn *DataNode) MatchLocation(ip string, port int) bool { } func (dn *DataNode) Url() string { + if dn.PublicUrl != "" { + return dn.PublicUrl + } return dn.Ip + ":" + strconv.Itoa(dn.Port) }