lib/opentsdbhttp: fix a typo preventing from using writeconcurrencylimiter (#4208)

This commit is contained in:
Haleygo 2023-04-27 15:22:42 +08:00 committed by Aliaksandr Valialkin
parent 56350eb1ce
commit c7a407368a
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -32,7 +32,7 @@ var (
func ParseStream(req *http.Request, callback func(rows []Row) error) error { func ParseStream(req *http.Request, callback func(rows []Row) error) error {
wcr := writeconcurrencylimiter.GetReader(req.Body) wcr := writeconcurrencylimiter.GetReader(req.Body)
defer writeconcurrencylimiter.PutReader(wcr) defer writeconcurrencylimiter.PutReader(wcr)
r := io.Reader(req.Body) r := io.Reader(wcr)
readCalls.Inc() readCalls.Inc()
if req.Header.Get("Content-Encoding") == "gzip" { if req.Header.Get("Content-Encoding") == "gzip" {