2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-23 04:28:01 +00:00

check whatever password is empty or not

This commit is contained in:
mohammed jasem alaajel 2022-07-17 09:14:39 +04:00
parent 36136d0c0f
commit a9600a7d8a

View File

@ -881,8 +881,12 @@ public class RedisBungeeBungeePlugin extends Plugin implements RedisBungeePlugin
if (yamlConfiguration.getBoolean("cluster-mode-enabled", false)) { if (yamlConfiguration.getBoolean("cluster-mode-enabled", false)) {
GenericObjectPoolConfig<Connection> poolConfig = new GenericObjectPoolConfig<>(); GenericObjectPoolConfig<Connection> poolConfig = new GenericObjectPoolConfig<>();
poolConfig.setMaxTotal(yamlConfiguration.getInt("max-redis-connections", 8)); poolConfig.setMaxTotal(yamlConfiguration.getInt("max-redis-connections", 8));
if (redisPassword != null) {
this.jedisSummoner = new ClusterJedisSummoner(new JedisCluster(new HostAndPort(redisServer, redisPort), 5000, 5000, 60, serverId, redisPassword, poolConfig, useSSL)); this.jedisSummoner = new ClusterJedisSummoner(new JedisCluster(new HostAndPort(redisServer, redisPort), 5000, 5000, 60, serverId, redisPassword, poolConfig, useSSL));
this.redisBungeeMode = RedisBungeeMode.CLUSTER; } else {
this.jedisSummoner = new ClusterJedisSummoner(new JedisCluster(new HostAndPort(redisServer, redisPort), 5000, 5000, 60, poolConfig));
getLogger().warning("SSL option is ignored in Cluster mode if no PASSWORD is set");
}this.redisBungeeMode = RedisBungeeMode.CLUSTER;
getLogger().log(Level.INFO, "RedisBungee MODE: CLUSTER"); getLogger().log(Level.INFO, "RedisBungee MODE: CLUSTER");
} else { } else {
JedisPoolConfig config = new JedisPoolConfig(); JedisPoolConfig config = new JedisPoolConfig();