From 3116efd4986db69a1c5168530b50026c0fb7f9d6 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Sat, 25 Jun 2022 08:24:34 +0800 Subject: [PATCH] chore: RESTful test group use request context --- hub/route/groups.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hub/route/groups.go b/hub/route/groups.go index e877bfd0..13133e9c 100644 --- a/hub/route/groups.go +++ b/hub/route/groups.go @@ -64,7 +64,7 @@ func getGroupDelay(w http.ResponseWriter, r *http.Request) { return } - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*time.Duration(timeout)) + ctx, cancel := context.WithTimeout(r.Context(), time.Millisecond*time.Duration(timeout)) defer cancel() dm, err := group.URLTest(ctx, url)