mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver/api/rafthttp: fix the location of close http body.
This commit is contained in:
parent
6da17cda18
commit
bd41f74168
@ -155,12 +155,12 @@ func (p *pipeline) post(data []byte) (err error) {
|
||||
p.picker.unreachable(u)
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
b, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
p.picker.unreachable(u)
|
||||
return err
|
||||
}
|
||||
resp.Body.Close()
|
||||
|
||||
err = checkPostResponse(resp, b, req, p.peerID)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user