Skip to content

Commit

Permalink
chore: address the sonarcloud issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SKannaniOS committed Jul 30, 2024
1 parent 38c169f commit 1179b6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/Classes/RSExponentialBackOff.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ - (instancetype)initWithMaximumDelay:(int) seconds {
* Function will calculate the next delay value in seconds
*/
- (int)nextDelay {
int delay = (int)pow(2, _attempt++);
int delay = (int)pow(2, _attempt);
_attempt = _attempt + 1;

int jitter = arc4random_uniform((delay + 1));

int exponentialDelay = _initialDelay + delay + jitter;
Expand Down

0 comments on commit 1179b6f

Please sign in to comment.