Skip to content

Commit

Permalink
etcdctl: fix syncWithPeerAPI by breaking the loop when there is no error
Browse files Browse the repository at this point in the history
  • Loading branch information
xiang90 committed Dec 30, 2015
1 parent 22c3208 commit cb779b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions etcdctl/command/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit cb779b2

Please sign in to comment.