diff options
Diffstat (limited to 'weed/operation/grpc_client.go')
| -rw-r--r-- | weed/operation/grpc_client.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/operation/grpc_client.go b/weed/operation/grpc_client.go index 025a65b38..39f70343a 100644 --- a/weed/operation/grpc_client.go +++ b/weed/operation/grpc_client.go @@ -2,6 +2,7 @@ package operation import ( "fmt" + "github.com/chrislusf/seaweedfs/weed/util" "strconv" "strings" @@ -35,7 +36,7 @@ func toVolumeServerGrpcAddress(volumeServer string) (grpcAddress string, err err glog.Errorf("failed to parse volume server address: %v", volumeServer) return "", err } - return fmt.Sprintf("%s:%d", volumeServer[0:sepIndex], port+10000), nil + return util.JoinHostPort(volumeServer[0:sepIndex], port+10000), nil } func WithMasterServerClient(masterServer string, grpcDialOption grpc.DialOption, fn func(masterClient master_pb.SeaweedClient) error) error { |
