Skip to content

Commit d6e3382

Browse files
committed
migrates to use the .retryWhen(Retry) method
Signed-off-by: Oleh Dokuka <shadowgun@i.ua>
1 parent 3495632 commit d6e3382

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rsocket-load-balancer/src/main/java/io/rsocket/client/LoadBalancedRSocketMono.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import reactor.core.publisher.Flux;
4343
import reactor.core.publisher.Mono;
4444
import reactor.core.publisher.MonoProcessor;
45+
import reactor.util.retry.Retry;
4546

4647
/**
4748
* An implementation of {@link Mono} that load balances across a pool of RSockets and emits one when
@@ -589,7 +590,9 @@ private class WeightedSocket implements LoadBalancerSocketMetrics, RSocket {
589590

590591
factory
591592
.get()
592-
.retryBackoff(weightedSocketRetries, weightedSocketBackOff, weightedSocketMaxBackOff)
593+
.retryWhen(
594+
Retry.backoff(weightedSocketRetries, weightedSocketBackOff)
595+
.maxBackoff(weightedSocketMaxBackOff))
593596
.doOnError(
594597
throwable -> {
595598
logger.error(

0 commit comments

Comments
 (0)