Skip to content

Commit

Permalink
relax retries
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Blaschke <[email protected]>
  • Loading branch information
mblaschke committed Dec 10, 2022
1 parent 8f59509 commit 137c519
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion azuremetadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (m *AzureMetadata) Init() {
// retry
m.restClient.SetRetryCount(5)
m.restClient.SetRetryMaxWaitTime(30 * time.Second)
m.restClient.SetRetryWaitTime(5 * time.Second)
m.restClient.SetRetryWaitTime(10 * time.Second)
m.restClient.AddRetryCondition(resty.RetryConditionFunc(func(r *resty.Response, err error) bool {
// retry for 4xx and 5xx
return r.StatusCode() >= http.StatusBadRequest
Expand Down

0 comments on commit 137c519

Please sign in to comment.