@@ -14,14 +14,6 @@ public enum RetryPolicyStrategy: Sendable {
1414 /// - duration: The initial duration between retries.
1515 case constant( retry: Int , duration: DispatchTimeInterval )
1616
17- /// A retry strategy with an exponential increase in duration between retries.
18- ///
19- /// - Parameters:
20- /// - retry: The number of retry attempts.
21- /// - multiplier: The multiplier for calculating the exponential backoff duration (default is 2).
22- /// - duration: The initial duration between retries.
23- case exponential( retry: Int , multiplier: Double = 2 , duration: DispatchTimeInterval )
24-
2517 /// A retry strategy with exponential increase in duration between retries and added jitter.
2618 ///
2719 /// - Parameters:
@@ -30,7 +22,7 @@ public enum RetryPolicyStrategy: Sendable {
3022 /// - maxInterval: The maximum allowed interval between retries (default is 60 seconds).
3123 /// - multiplier: The multiplier for calculating the exponential backoff duration (default is 2).
3224 /// - duration: The initial duration between retries.
33- case exponentialWithJitter (
25+ case exponential (
3426 retry: Int ,
3527 jitterFactor: Double = 0.1 ,
3628 maxInterval: DispatchTimeInterval ? = . seconds( 60 ) ,
@@ -43,9 +35,7 @@ public enum RetryPolicyStrategy: Sendable {
4335 switch self {
4436 case let . constant( retry, _) :
4537 retry
46- case let . exponential( retry, _, _) :
47- retry
48- case let . exponentialWithJitter( retry, _, _, _, _) :
38+ case let . exponential( retry, _, _, _, _) :
4939 retry
5040 }
5141 }
@@ -55,9 +45,7 @@ public enum RetryPolicyStrategy: Sendable {
5545 switch self {
5646 case let . constant( _, duration) :
5747 duration
58- case let . exponential( _, _, duration) :
59- duration
60- case let . exponentialWithJitter( _, _, _, _, duration) :
48+ case let . exponential( _, _, _, _, duration) :
6149 duration
6250 }
6351 }
0 commit comments