Browse Source

etcdserver: close response body when getting cluster information

magicwang-cn 9 years ago
parent
commit
97c71f44fd
1 changed files with 1 additions and 0 deletions
  1. 1 0
      etcdserver/cluster_util.go

+ 1 - 0
etcdserver/cluster_util.go

@@ -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)