From 4e1c4a3e58ae4e80235ecab58e52751d47087e96 Mon Sep 17 00:00:00 2001 From: mazrean Date: Fri, 9 Aug 2024 20:00:53 +0900 Subject: [PATCH] fix http continue --- http/http.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http/http.go b/http/http.go index b8e48cd..4b981f5 100644 --- a/http/http.go +++ b/http/http.go @@ -142,14 +142,14 @@ func StdMetricsMiddleware(next http.Handler) http.Handler { return next } - benchmark.Continue() - return http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { if !config.Enable { next.ServeHTTP(res, req) return } + benchmark.Continue() + var metrics *responseWriterMetrics wrappedRes := isuhttpgen.ResponseWriterWrapper(res, func(w http.ResponseWriter) isuhttpgen.ResponseWriter { rw := newResponseWriterWithMetrics(w)