etcdserver: close response body when getting cluster information

This commit is contained in:
magicwang-cn 2016-04-18 21:16:20 +08:00
parent b494ad3a0d
commit 97c71f44fd

View File

@ -73,6 +73,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)