Skip to content

Commit

Permalink
hotfix: move context inside for loop for proxy requests
Browse files Browse the repository at this point in the history
  • Loading branch information
myleshorton committed Dec 13, 2024
1 parent 4d26cc2 commit 91f2552
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 91f2552

Please sign in to comment.