aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--weed/wdclient/masterclient.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/wdclient/masterclient.go b/weed/wdclient/masterclient.go
index e39b9dfdf..da812dc22 100644
--- a/weed/wdclient/masterclient.go
+++ b/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
}