Commit bec5ef6
node: avoid double close resp.Body (ethereum#31710)
The functions `rpcRequest` and `batchRpcRequest` call `baseRpcRequest`.
And `resp.Body` will be closed in the function `baseRpcRequest` later by
`t.Cleanup`:
```go
func baseRpcRequest(t *testing.T, url, bodyStr string, extraHeaders ...string) *http.Response {
// ......
t.Cleanup(func() { resp.Body.Close() })
return resp
}
```1 parent 593fd11 commit bec5ef6
1 file changed
+0
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
573 | | - | |
574 | 573 | | |
575 | 574 | | |
576 | 575 | | |
| |||
584 | 583 | | |
585 | 584 | | |
586 | 585 | | |
587 | | - | |
588 | 586 | | |
589 | 587 | | |
590 | 588 | | |
| |||
0 commit comments