Skip to content

Commit

Permalink
Fix ssl connections on PooledConnections
Browse files Browse the repository at this point in the history
useSSL in configloader wasn't passing it to the ConnectionProvider
  • Loading branch information
ham1255 committed Nov 5, 2022
1 parent 5e3ce72 commit 748bc13
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ default void loadConfig(RedisBungeePlugin<?> plugin, File dataFolder) throws IOE
loadConfig(plugin, dataFolder.toPath());
}

// There currently a problem with the SSL/TLS connections
// looking into the Jedis source code you can pass some form of
// Domain Validation, SSL factory from javax packages
// todo: create Domain valdiation
// todo: add new config options for ssl certs locations
default void loadConfig(RedisBungeePlugin<?> plugin, Path dataFolder) throws IOException {
Path configFile = createConfigFile(dataFolder);
final YAMLConfigurationLoader yamlConfigurationFileLoader = YAMLConfigurationLoader.builder().setPath(configFile).build();
Expand Down Expand Up @@ -126,7 +121,7 @@ default void loadConfig(RedisBungeePlugin<?> plugin, Path dataFolder) throws IOE
GenericObjectPoolConfig<Connection> poolConfig = new GenericObjectPoolConfig<>();
poolConfig.setMaxTotal(maxConnections);
poolConfig.setBlockWhenExhausted(true);
summoner = new JedisPooledSummoner(new PooledConnectionProvider(new ConnectionFactory(new HostAndPort(redisServer, redisPort), DefaultJedisClientConfig.builder().timeoutMillis(5000).password(redisPassword).build()), poolConfig), jedisPool);
summoner = new JedisPooledSummoner(new PooledConnectionProvider(new ConnectionFactory(new HostAndPort(redisServer, redisPort), DefaultJedisClientConfig.builder().timeoutMillis(5000).ssl(useSSL).password(redisPassword).build()), poolConfig), jedisPool);
redisBungeeMode = RedisBungeeMode.SINGLE;
}
plugin.logInfo("Successfully connected to Redis.");
Expand Down

0 comments on commit 748bc13

Please sign in to comment.