mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Fix reconnection attempt count in ReactorNettyTcpClient
Prior to this commit, the reconnection attempt count provided to the reconnect strategy would not give the updated, incremented value but instead the previous one. This commit fixes this and ensures the value is incremented before it's given to the strategy. Fixes gh-37223
This commit is contained in:
+1
-1
@@ -222,7 +222,7 @@ public class ReactorNettyTcpClient<P> implements TcpOperations<P> {
|
||||
.map(retrySignal -> (int) retrySignal.totalRetriesInARow())
|
||||
.flatMap(attempt -> reconnect(attempt, strategy))))
|
||||
.repeatWhen(flux -> flux
|
||||
.scan(1, (count, element) -> count++)
|
||||
.scan(1, (count, element) -> count + 1)
|
||||
.flatMap(attempt -> reconnect(attempt, strategy)))
|
||||
.subscribe();
|
||||
return connectFuture;
|
||||
|
||||
Reference in New Issue
Block a user