aboutsummaryrefslogtreecommitdiff
path: root/weed/topology/data_node.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-09-07 19:29:42 -0700
committerChris Lu <chris.lu@gmail.com>2021-09-07 19:29:42 -0700
commit574485ec69c1d1a7be8765f5da24d9c23803cb96 (patch)
tree2a47c75dd4d8ff84a39eaf2548ba0989c659c07e /weed/topology/data_node.go
parent0128239c0f8829bb20edd1df257840dcbfa37c0e (diff)
downloadseaweedfs-574485ec69c1d1a7be8765f5da24d9c23803cb96.tar.xz
seaweedfs-574485ec69c1d1a7be8765f5da24d9c23803cb96.zip
better IP v6 support
Diffstat (limited to 'weed/topology/data_node.go')
-rw-r--r--weed/topology/data_node.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/weed/topology/data_node.go b/weed/topology/data_node.go
index 3f0234ca8..cd3249c98 100644
--- a/weed/topology/data_node.go
+++ b/weed/topology/data_node.go
@@ -2,14 +2,12 @@ package topology
import (
"fmt"
+ "github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
+ "github.com/chrislusf/seaweedfs/weed/storage"
"github.com/chrislusf/seaweedfs/weed/storage/needle"
"github.com/chrislusf/seaweedfs/weed/storage/types"
"github.com/chrislusf/seaweedfs/weed/util"
- "strconv"
-
- "github.com/chrislusf/seaweedfs/weed/glog"
- "github.com/chrislusf/seaweedfs/weed/storage"
)
type DataNode struct {
@@ -207,7 +205,7 @@ func (dn *DataNode) MatchLocation(ip string, port int) bool {
}
func (dn *DataNode) Url() string {
- return dn.Ip + ":" + strconv.Itoa(dn.Port)
+ return util.JoinHostPort(dn.Ip, dn.Port)
}
func (dn *DataNode) ToMap() interface{} {