From 91f25528e2536f2253cdf10a0150c2af051e85be Mon Sep 17 00:00:00 2001 From: Adam Fisk Date: Fri, 13 Dec 2024 07:49:36 -0700 Subject: [PATCH] hotfix: move context inside for loop for proxy requests --- services/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/config.go b/services/config.go index be47b2fee..6c3c060ee 100644 --- a/services/config.go +++ b/services/config.go @@ -177,9 +177,9 @@ func (cs *configService) fetch() (*apipb.ConfigResponse, int64, error) { resp *http.Response sleep int64 ) - ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute) - defer cancel() for { + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute) + defer cancel() req, err := cs.newRequest(ctx) if err != nil { return nil, 0, err