Skip to content

Commit

Permalink
Keep connections alive when using Go 1.4.3
Browse files Browse the repository at this point in the history
Go 1.4.3 was a security release that also created a strange edge-case
that caused connections to not be kept alive and reused when Close()
is called on the Body of the request. Close() hasn't been required on
the Body of a request for some time, so there is no harm is not calling
it anymore.
  • Loading branch information
joelegasse committed Mar 2, 2016
1 parent b39c35c commit 5d3f6e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/httpd/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,9 @@ func (h *Handler) serveWrite(w http.ResponseWriter, r *http.Request, user *meta.
resultError(w, influxql.Result{Err: err}, http.StatusBadRequest)
return
}
defer b.Close()
body = b
}
defer body.Close()

b, err := ioutil.ReadAll(body)
if err != nil {
Expand Down

0 comments on commit 5d3f6e1

Please sign in to comment.