1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-01 06:40:45 +02:00

simplify a bit

This commit is contained in:
Chris Lu 2021-05-21 02:10:44 -07:00
parent 0b00edfc3b
commit e8b7d4ad64

View file

@ -36,9 +36,7 @@ func NewMasterClient(grpcDialOption grpc.DialOption, clientType string, clientHo
} }
func (mc *MasterClient) GetMaster() string { func (mc *MasterClient) GetMaster() string {
for mc.currentMaster == "" { mc.WaitUntilConnected()
time.Sleep(time.Duration(rand.Int31n(200)) * time.Millisecond)
}
return mc.currentMaster return mc.currentMaster
} }