diff options
author | Oleksandr Redko <oleksandr.red+github@gmail.com> | 2023-02-15 12:54:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-15 11:54:23 +0100 |
commit | b79a03aaf94639119b26b5c6fef101b812c67d29 (patch) | |
tree | fc947aa7b9cdd5203b2f647337dc099b7c701650 /fasthttputil | |
parent | docs: Deprecate ErrAlreadyServing as never returning (#1491) (diff) | |
download | fasthttp-b79a03aaf94639119b26b5c6fef101b812c67d29.tar.gz fasthttp-b79a03aaf94639119b26b5c6fef101b812c67d29.tar.bz2 fasthttp-b79a03aaf94639119b26b5c6fef101b812c67d29.zip |
test: close response body (#1496)
Diffstat (limited to 'fasthttputil')
-rw-r--r-- | fasthttputil/inmemory_listener_test.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fasthttputil/inmemory_listener_test.go b/fasthttputil/inmemory_listener_test.go index e9d5125..cbaa6df 100644 --- a/fasthttputil/inmemory_listener_test.go +++ b/fasthttputil/inmemory_listener_test.go @@ -146,6 +146,7 @@ func testInmemoryListenerHTTPSingle(t *testing.T, client *http.Client, content s if err != nil { t.Fatalf("unexpected error: %v", err) } + defer func() { _ = res.Body.Close() }() b, err := io.ReadAll(res.Body) if err != nil { t.Fatalf("unexpected error: %v", err) |