Skip to content

Commit

Permalink
Fixes for AutomaticRetry
Browse files Browse the repository at this point in the history
  • Loading branch information
jguz-pubnub committed Sep 18, 2024
1 parent 210c4e4 commit 7db0d62
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public struct AutomaticRetry: RequestOperator, Hashable {
case let .exponential(minDelay, maxDelay):
let validatedMinDelay = Self.validate(
value: minDelay,
using: minDelay > Self.minDelay,
using: minDelay >= Self.minDelay,
replaceOnFailure: Self.minDelay,
warningMessage: "The `minDelay` must be a minimum of \(Self.minDelay)"
)
Expand All @@ -163,7 +163,7 @@ public struct AutomaticRetry: RequestOperator, Hashable {

self.retryLimit = Self.validate(
value: UInt(retryLimit),
using: retryLimit < policy.maximumRetryLimit(),
using: retryLimit <= policy.maximumRetryLimit(),
replaceOnFailure: UInt(policy.maximumRetryLimit()),
warningMessage: "The `retryLimit` for \(policy) must be less than or equal \(policy.maximumRetryLimit())"
)
Expand Down

0 comments on commit 7db0d62

Please sign in to comment.