Skip to content

Commit

Permalink
fix: exponentialBackoffExpireAt should start at 0
Browse files Browse the repository at this point in the history
  • Loading branch information
manofthepeace committed Dec 4, 2023
1 parent 3de0f29 commit 00e1dcd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static Function<Multi<Throwable>, Publisher<Long>> randomExponentialBacko
AtomicInteger index = new AtomicInteger();
return t -> t
.onItem().transformToUni(failure -> {
int iteration = index.incrementAndGet();
int iteration = index.getAndIncrement();
Duration delay = getNextDelay(firstBackoff, maxBackoff, jitterFactor, iteration);

long checkTime = System.currentTimeMillis() + delay.toMillis();
Expand Down

0 comments on commit 00e1dcd

Please sign in to comment.