Skip to content

Commit

Permalink
review comments - simplify retry logic
Browse files Browse the repository at this point in the history
  • Loading branch information
gandhipr committed Mar 28, 2024
1 parent 6eaa0c3 commit 0d5a71e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions cluster-autoscaler/cloudprovider/azure/azure_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,11 @@ func createAzureManagerInternal(configReader io.Reader, discoveryOpts cloudprovi
Cap: 10 * time.Minute,
}

if err := manager.forceRefresh(); err != nil {
err = kretry.OnError(retryBackoff, retry.IsErrorRetriable, func() (err error) {
return manager.forceRefresh()
})
if err != nil {
return nil, err
}
return manager, nil
err = kretry.OnError(retryBackoff, retry.IsErrorRetriable, func() (err error) {
return manager.forceRefresh()
})
if err != nil {
return nil, err
}

return manager, nil
Expand Down

0 comments on commit 0d5a71e

Please sign in to comment.