chore: RESTful test group use request context

This commit is contained in:
Skyxim 2022-06-25 08:24:34 +08:00
parent 4ba34ce672
commit 2cdf4a0532

View file

@ -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)