Skip to content

Commit

Permalink
Fix Sentinel constructor (#2574)
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 committed Jul 14, 2021
1 parent 81a9ee7 commit ac85198
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/redis/clients/jedis/JedisSentinelPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,14 @@ public JedisSentinelPool(String masterName, Set<String> sentinels,
final String user, final String password, final int database, final String clientName,
final int sentinelConnectionTimeout, final int sentinelSoTimeout, final String sentinelUser,
final String sentinelPassword, final String sentinelClientName) {
this(masterName, sentinels, poolConfig, new JedisFactory(connectionTimeout, soTimeout, infiniteSoTimeout, user, password, database, clientName));
this(masterName, parseHostAndPorts(sentinels), poolConfig,
DefaultJedisClientConfig.builder().connectionTimeoutMillis(connectionTimeout)
.socketTimeoutMillis(soTimeout).blockingSocketTimeoutMillis(infiniteSoTimeout)
.user(user).password(password).database(database).clientName(clientName).build(),
DefaultJedisClientConfig.builder().connectionTimeoutMillis(sentinelConnectionTimeout)
.socketTimeoutMillis(sentinelSoTimeout).user(sentinelUser).password(sentinelPassword)
.clientName(sentinelClientName).build()
);
this.connectionTimeout = connectionTimeout;
this.soTimeout = soTimeout;
this.infiniteSoTimeout = infiniteSoTimeout;
Expand Down

0 comments on commit ac85198

Please sign in to comment.