mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
waits in case master lost connection
This commit is contained in:
parent
085a61cb8f
commit
0b00edfc3b
|
@ -36,6 +36,9 @@ func NewMasterClient(grpcDialOption grpc.DialOption, clientType string, clientHo
|
|||
}
|
||||
|
||||
func (mc *MasterClient) GetMaster() string {
|
||||
for mc.currentMaster == "" {
|
||||
time.Sleep(time.Duration(rand.Int31n(200)) * time.Millisecond)
|
||||
}
|
||||
return mc.currentMaster
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue