diff options
| author | hilimd <68371223+hilimd@users.noreply.github.com> | 2021-09-13 10:34:33 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-13 10:34:33 +0800 |
| commit | 1de733fda507e1da94b2e4741c74ba7e5e2c5f76 (patch) | |
| tree | aed7ac29e27e0f8def942154603375396fae9489 /weed/command/master_follower.go | |
| parent | 27c05f8c0b5c7bda43babeb61d79684d11851111 (diff) | |
| parent | 7591336a2269c1ad92266280634bcaea34f7a5d1 (diff) | |
| download | seaweedfs-1de733fda507e1da94b2e4741c74ba7e5e2c5f76.tar.xz seaweedfs-1de733fda507e1da94b2e4741c74ba7e5e2c5f76.zip | |
Merge pull request #81 from chrislusf/master
sync
Diffstat (limited to 'weed/command/master_follower.go')
| -rw-r--r-- | weed/command/master_follower.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/weed/command/master_follower.go b/weed/command/master_follower.go index b628f7abf..48548a389 100644 --- a/weed/command/master_follower.go +++ b/weed/command/master_follower.go @@ -13,7 +13,6 @@ import ( "github.com/gorilla/mux" "google.golang.org/grpc/reflection" "net/http" - "strconv" "strings" "time" ) @@ -114,7 +113,7 @@ func startMasterFollower(masterOptions MasterOptions) { r := mux.NewRouter() ms := weed_server.NewMasterServer(r, option, masters) - listeningAddress := *masterOptions.ipBind + ":" + strconv.Itoa(*masterOptions.port) + listeningAddress := util.JoinHostPort(*masterOptions.ipBind, *masterOptions.port) glog.V(0).Infof("Start Seaweed Master %s at %s", util.Version(), listeningAddress) masterListener, e := util.NewListener(listeningAddress, 0) if e != nil { @@ -123,7 +122,7 @@ func startMasterFollower(masterOptions MasterOptions) { // starting grpc server grpcPort := *masterOptions.port + 10000 - grpcL, err := util.NewListener(*masterOptions.ipBind+":"+strconv.Itoa(grpcPort), 0) + grpcL, err := util.NewListener(util.JoinHostPort(*masterOptions.ipBind, grpcPort), 0) if err != nil { glog.Fatalf("master failed to listen on grpc port %d: %v", grpcPort, err) } |
