mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
refactor
This commit is contained in:
parent
5496d68f6a
commit
59cb6146a3
|
@ -24,8 +24,7 @@ func (vs *VolumeServer) GetMaster() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (vs *VolumeServer) checkWithMaster() (err error) {
|
func (vs *VolumeServer) checkWithMaster() (err error) {
|
||||||
isConnected := false
|
for {
|
||||||
for !isConnected {
|
|
||||||
for _, master := range vs.SeedMasterNodes {
|
for _, master := range vs.SeedMasterNodes {
|
||||||
err = operation.WithMasterServerClient(master, vs.grpcDialOption, func(masterClient master_pb.SeaweedClient) error {
|
err = operation.WithMasterServerClient(master, vs.grpcDialOption, func(masterClient master_pb.SeaweedClient) error {
|
||||||
resp, err := masterClient.GetMasterConfiguration(context.Background(), &master_pb.GetMasterConfigurationRequest{})
|
resp, err := masterClient.GetMasterConfiguration(context.Background(), &master_pb.GetMasterConfigurationRequest{})
|
||||||
|
@ -44,7 +43,6 @@ func (vs *VolumeServer) checkWithMaster() (err error) {
|
||||||
}
|
}
|
||||||
time.Sleep(1790 * time.Millisecond)
|
time.Sleep(1790 * time.Millisecond)
|
||||||
}
|
}
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (vs *VolumeServer) heartbeat() {
|
func (vs *VolumeServer) heartbeat() {
|
||||||
|
|
Loading…
Reference in a new issue