Browse Source

waits in case master lost connection

pull/2078/head
Chris Lu 4 years ago
parent
commit
0b00edfc3b
  1. 3
      weed/wdclient/masterclient.go

3
weed/wdclient/masterclient.go

@ -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…
Cancel
Save