fixed missing loop in WaitUntilReachable
This commit is contained in:
parent
075a8441cd
commit
faf807cb86
@ -24,6 +24,7 @@ func (c *Client) WaitUntilReachable(ctx context.Context) bool {
|
|||||||
ticker := time.NewTicker(100 * time.Millisecond)
|
ticker := time.NewTicker(100 * time.Millisecond)
|
||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
|
|
||||||
|
for {
|
||||||
select {
|
select {
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
if c.IsReachable() {
|
if c.IsReachable() {
|
||||||
@ -32,6 +33,5 @@ func (c *Client) WaitUntilReachable(ctx context.Context) bool {
|
|||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user