diff --git a/implementation/src/main/java/io/smallrye/mutiny/helpers/ExponentialBackoff.java b/implementation/src/main/java/io/smallrye/mutiny/helpers/ExponentialBackoff.java index a735382b9..4d3e28cc0 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/helpers/ExponentialBackoff.java +++ b/implementation/src/main/java/io/smallrye/mutiny/helpers/ExponentialBackoff.java @@ -104,7 +104,7 @@ public static Function, Publisher> 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();