Skip to content

Commit

Permalink
etcdserver: close response body when getting cluster information
Browse files Browse the repository at this point in the history
  • Loading branch information
magicwang-cn authored and gyuho committed Apr 21, 2016
1 parent 37510d0 commit 31bd750
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions etcdserver/cluster_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func getClusterFromRemotePeers(urls []string, timeout time.Duration, logerr bool
continue
}
b, err := ioutil.ReadAll(resp.Body)
resp.Body.Close()
if err != nil {
if logerr {
plog.Warningf("could not read the body of cluster response: %v", err)
Expand Down

0 comments on commit 31bd750

Please sign in to comment.