Fixed - connection timeout during Redisson start ignores connections amount. #5548

pull/5564/head
Nikita Koksharov 1 year ago
parent 5062dca6e8
commit c997fe98fa

@ -222,7 +222,7 @@ public class MasterSlaveConnectionManager implements ConnectionManager {
String hostname = hostnameMapper.apply(uri);
CompletableFuture<RedisClient> masterFuture = masterSlaveEntry.setupMasterEntry(uri, hostname);
try {
masterFuture.get(config.getConnectTimeout(), TimeUnit.MILLISECONDS);
masterFuture.get(config.getConnectTimeout()*config.getMasterConnectionMinimumIdleSize(), TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} catch (ExecutionException | TimeoutException e) {
@ -232,7 +232,7 @@ public class MasterSlaveConnectionManager implements ConnectionManager {
if (!config.isSlaveNotUsed()) {
CompletableFuture<Void> fs = masterSlaveEntry.initSlaveBalancer(disconnectedSlaves, hostnameMapper);
try {
fs.get(config.getConnectTimeout(), TimeUnit.MILLISECONDS);
fs.get(config.getConnectTimeout()*config.getSlaveConnectionMinimumIdleSize(), TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} catch (ExecutionException | TimeoutException e) {

Loading…
Cancel
Save