From 021c821992b6d3e26b2db87ec1bbc80882891e39 Mon Sep 17 00:00:00 2001 From: Erik Dubbelboer Date: Tue, 11 Feb 2020 19:19:59 +0100 Subject: [PATCH] Fix NetHTTPServerGet benchmarks Fixes https://github.com/valyala/fasthttp/issues/742 --- server_timing_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server_timing_test.go b/server_timing_test.go index 4c6be4accd..6ed1cae031 100644 --- a/server_timing_test.go +++ b/server_timing_test.go @@ -447,9 +447,7 @@ func benchmarkServer(b *testing.B, s realServer, clientsCount, requestsPerConn i ln := newFakeListener(b.N, clientsCount, requestsPerConn, request) ch := make(chan struct{}) go func() { - if err := s.Serve(ln); err != nil { - panic(err) - } + s.Serve(ln) //nolint:errcheck ch <- struct{}{} }()