mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: close response body when getting cluster information
This commit is contained in:
parent
b494ad3a0d
commit
97c71f44fd
@ -73,6 +73,7 @@ func getClusterFromRemotePeers(urls []string, timeout time.Duration, logerr bool
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
b, err := ioutil.ReadAll(resp.Body)
|
b, err := ioutil.ReadAll(resp.Body)
|
||||||
|
resp.Body.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if logerr {
|
if logerr {
|
||||||
plog.Warningf("could not read the body of cluster response: %v", err)
|
plog.Warningf("could not read the body of cluster response: %v", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user