Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

simplify a bit

Chris Lue8b7d4ad64e4
diff --git a/weed/wdclient/masterclient.go b/weed/wdclient/masterclient.go
index da812dc22f..d76ae31e2b 100644
--- a/weed/wdclient/masterclient.go
+++ b/weed/wdclient/masterclient.go
@@ -36,9 +36,7 @@ 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)
- }
+ mc.WaitUntilConnected()
return mc.currentMaster
}