Skip to content

Commit

Permalink
Merge pull request etcd-io#10535 from johncming/fix_close_pos
Browse files Browse the repository at this point in the history
etcdserver/api/rafthttp: fix the location of close http body.
  • Loading branch information
xiang90 authored Mar 11, 2019
2 parents 6da17cd + bd41f74 commit b7ad8c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etcdserver/api/rafthttp/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b7ad8c6

Please sign in to comment.