From 59cb6146a3ac9e328ecb5eb7d743ab8013d6a858 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 11 Sep 2021 02:06:30 -0700 Subject: [PATCH] refactor --- weed/server/volume_grpc_client_to_master.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/weed/server/volume_grpc_client_to_master.go b/weed/server/volume_grpc_client_to_master.go index f8875169f..c4e708dc2 100644 --- a/weed/server/volume_grpc_client_to_master.go +++ b/weed/server/volume_grpc_client_to_master.go @@ -24,8 +24,7 @@ func (vs *VolumeServer) GetMaster() string { } func (vs *VolumeServer) checkWithMaster() (err error) { - isConnected := false - for !isConnected { + for { for _, master := range vs.SeedMasterNodes { err = operation.WithMasterServerClient(master, vs.grpcDialOption, func(masterClient master_pb.SeaweedClient) error { resp, err := masterClient.GetMasterConfiguration(context.Background(), &master_pb.GetMasterConfigurationRequest{}) @@ -44,7 +43,6 @@ func (vs *VolumeServer) checkWithMaster() (err error) { } time.Sleep(1790 * time.Millisecond) } - return } func (vs *VolumeServer) heartbeat() {