aboutsummaryrefslogtreecommitdiff
path: root/client_timing_test.go
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2022-07-29 19:03:15 +0200
committerGravatar GitHub <noreply@github.com> 2022-07-29 19:03:15 +0200
commita5f448fc970972ab47113971d898a22fb28fef52 (patch)
tree826fe1e91cdca5002f7db0bef4b8dfdcf55efddc /client_timing_test.go
parentPrevent overflow and panic on large HTTP responses (#1351) (diff)
downloadfasthttp-a5f448fc970972ab47113971d898a22fb28fef52.tar.gz
fasthttp-a5f448fc970972ab47113971d898a22fb28fef52.tar.bz2
fasthttp-a5f448fc970972ab47113971d898a22fb28fef52.zip
Improve Client timeout (#1346)
Don't run requests in a separate Goroutine anymore. Instead use proper conn deadlines to enforce timeouts. - Also contains some linting fixes.
Diffstat (limited to 'client_timing_test.go')
-rw-r--r--client_timing_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/client_timing_test.go b/client_timing_test.go
index af885aa..ac631ca 100644
--- a/client_timing_test.go
+++ b/client_timing_test.go
@@ -515,7 +515,7 @@ func BenchmarkNetHTTPClientEndToEndBigResponse10Inmemory(b *testing.B) {
func benchmarkNetHTTPClientEndToEndBigResponseInmemory(b *testing.B, parallelism int) {
bigResponse := createFixedBody(1024 * 1024)
- h := func(w http.ResponseWriter, r *http.Request) {
+ h := func(w http.ResponseWriter, _ *http.Request) {
w.Header().Set(HeaderContentType, "text/plain")
w.Write(bigResponse) //nolint:errcheck
}