mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctl: fix syncWithPeerAPI by breaking the loop when there is no error
This commit is contained in:
parent
22c3208fb3
commit
cb779b2305
@ -307,8 +307,8 @@ func syncWithPeerAPI(c *cli.Context, ctx context.Context, knownPeers []string) (
|
||||
}
|
||||
body, err = ioutil.ReadAll(resp.Body)
|
||||
resp.Body.Close()
|
||||
if err != nil {
|
||||
continue
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user