Fix garage Wait method not sleeping properly between tries
This commit is contained in:
parent
629a8ec9b2
commit
da100c6170
@ -130,7 +130,12 @@ func (c *AdminClient) Do(
|
||||
// ReplicationFactor-1 other garage instances. If the context is canceled it
|
||||
// will return the context error.
|
||||
func (c *AdminClient) Wait(ctx context.Context) error {
|
||||
for {
|
||||
|
||||
for first := true; ; first = false {
|
||||
|
||||
if !first {
|
||||
time.Sleep(250 * time.Millisecond)
|
||||
}
|
||||
|
||||
var clusterStatus struct {
|
||||
KnownNodes map[string]struct {
|
||||
@ -159,6 +164,5 @@ func (c *AdminClient) Wait(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
time.Sleep(250 * time.Millisecond)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user