Skip to content

Commit

Permalink
fix: use tempCtx (#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeldeib authored Sep 11, 2020
1 parent 092eb9e commit 9d0c31c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autorest/adal/token_legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func getMSIEndpoint(ctx context.Context, sender Sender) (*http.Response, error)
tempCtx, cancel := context.WithTimeout(ctx, 500*time.Millisecond)
defer cancel()
req, _ := http.NewRequest(http.MethodGet, msiEndpoint, nil)
req = req.WithContext(ctx)
req = req.WithContext(tempCtx)
q := req.URL.Query()
q.Add("api-version", msiAPIVersion)
req.URL.RawQuery = q.Encode()
Expand Down

0 comments on commit 9d0c31c

Please sign in to comment.