diff options
| author | yourchanges <yourchanges@gmail.com> | 2015-02-12 18:37:26 +0800 |
|---|---|---|
| committer | yourchanges <yourchanges@gmail.com> | 2015-02-12 18:37:26 +0800 |
| commit | 701bb9af19d9773896eb360c921a4c7fb6a2a2ea (patch) | |
| tree | 51cc2133ea6dd7eca0db236c78dc338a3aa2cc32 /go/topology/data_node.go | |
| parent | 2e0d0046c49e4da8bd59b436e57fcbc77056e4d7 (diff) | |
| download | seaweedfs-701bb9af19d9773896eb360c921a4c7fb6a2a2ea.tar.xz seaweedfs-701bb9af19d9773896eb360c921a4c7fb6a2a2ea.zip | |
Move the redirect url perfer to volume server's PublicUrl
Diffstat (limited to 'go/topology/data_node.go')
| -rw-r--r-- | go/topology/data_node.go | 3 |
1 files changed, 3 insertions, 0 deletions
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) } |
