mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-12-23 02:28:01 +00:00
Fix ssl connections on PooledConnections
useSSL in configloader wasn't passing it to the ConnectionProvider
This commit is contained in:
parent
5e3ce725de
commit
748bc13568
@ -39,11 +39,6 @@ public interface ConfigLoader {
|
||||
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();
|
||||
@ -126,7 +121,7 @@ public interface ConfigLoader {
|
||||
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.");
|
||||
|
Loading…
Reference in New Issue
Block a user