Commit 70dddb6
authored
querier: exhaust response body before closing (#4429)
Exhaust the whole body of the response before closing to facilitate
re-use of keep-alive connections as per the documentation here:
https://pkg.go.dev/net/http#Client.Get
```
Caller should close resp.Body when done reading from it.
```
Also some discussion here:
https://groups.google.com/g/golang-nuts/c/148riho42sU
#4428
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>1 parent 88171a5 commit 70dddb6
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
289 | 291 | | |
290 | 292 | | |
291 | 293 | | |
292 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
293 | 298 | | |
294 | 299 | | |
295 | 300 | | |
0 commit comments