Skip to content

Commit

Permalink
fixes issue where context is being used for waitGlobal operation
Browse files Browse the repository at this point in the history
  • Loading branch information
eoinmcafee00 committed May 5, 2022
1 parent 98c1f93 commit 1f886a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/google/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func New(opts ...Option) (autoscaler.Provider, error) {
func (p *provider) waitZoneOperation(ctx context.Context, name string, zone string) error {
for {
if p.rateLimiter.Allow() {
op, err := p.service.ZoneOperations.Get(p.project, zone, name).Context(ctx).Do()
op, err := p.service.ZoneOperations.Get(p.project, zone, name).Do()
if err != nil {
if gerr, ok := err.(*googleapi.Error); ok &&
gerr.Code == http.StatusNotFound {
Expand All @@ -143,7 +143,7 @@ func (p *provider) waitZoneOperation(ctx context.Context, name string, zone stri
func (p *provider) waitGlobalOperation(ctx context.Context, name string) error {
for {
if p.rateLimiter.Allow() {
op, err := p.service.GlobalOperations.Get(p.project, name).Context(ctx).Do()
op, err := p.service.GlobalOperations.Get(p.project, name).Do()
if err != nil {
return err
}
Expand Down

0 comments on commit 1f886a3

Please sign in to comment.