Skip to content

Commit 4612e2a

Browse files
committed
nit
1 parent f6bd5f5 commit 4612e2a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/retry.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func RetryWithData[T any](functionToRetry func() (T, error), config *RetryConfig
160160
expBackoff := backoff.NewExponentialBackOff(randomOption, multiplierOption, initialRetryOption, maxIntervalOption, maxElapsedTimeOption)
161161
var maxRetriesBackoff backoff.BackOff
162162

163-
if config.NumRetries > 0 {
163+
if config.MaxNumRetries > 0 {
164164
maxRetriesBackoff = backoff.WithMaxRetries(expBackoff, config.MaxNumRetries)
165165
} else {
166166
maxRetriesBackoff = expBackoff
@@ -207,7 +207,7 @@ func Retry(functionToRetry func() error, config *RetryConfig) error {
207207
expBackoff := backoff.NewExponentialBackOff(randomOption, multiplierOption, initialRetryOption, maxIntervalOption, maxElapsedTimeOption)
208208
var maxRetriesBackoff backoff.BackOff
209209

210-
if config.NumRetries > 0 {
210+
if config.MaxNumRetries > 0 {
211211
maxRetriesBackoff = backoff.WithMaxRetries(expBackoff, config.MaxNumRetries)
212212
} else {
213213
maxRetriesBackoff = expBackoff

0 commit comments

Comments
 (0)