mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
Fix Redis not working with local IPs
This commit is contained in:
parent
93a8a10212
commit
c93bd4fd2c
@ -27,7 +27,7 @@ dependencies {
|
||||
library 'org.json:json:20211205'
|
||||
library 'commons-io:commons-io:2.11.0'
|
||||
library 'dev.morphia.morphia:morphia-core:2.2.3'
|
||||
library 'redis.clients:jedis:4.1.0'
|
||||
library 'redis.clients:jedis:4.1.1'
|
||||
library 'org.mariadb.jdbc:mariadb-java-client:2.7.4'
|
||||
library 'org.apache.httpcomponents:httpclient:4.5.13'
|
||||
compileOnly 'io.papermc.paper:paper-api:1.18.1-R0.1-SNAPSHOT'
|
||||
|
@ -5,6 +5,7 @@ import dev.plex.PlexBase;
|
||||
import dev.plex.util.PlexLog;
|
||||
import redis.clients.jedis.Jedis;
|
||||
import redis.clients.jedis.JedisPool;
|
||||
import redis.clients.jedis.JedisPoolConfig;
|
||||
|
||||
public class RedisConnection extends PlexBase
|
||||
{
|
||||
@ -15,7 +16,7 @@ public class RedisConnection extends PlexBase
|
||||
{
|
||||
ClassLoader previous = Thread.currentThread().getContextClassLoader();
|
||||
Thread.currentThread().setContextClassLoader(RedisConnection.class.getClassLoader());
|
||||
this.pool = new JedisPool(plugin.config.getString("data.side.hostname"), Plex.get().getConfig().getInt("data.side.port"));
|
||||
this.pool = new JedisPool(new JedisPoolConfig(), plugin.config.getString("data.side.hostname"), Plex.get().getConfig().getInt("data.side.port"));
|
||||
Thread.currentThread().setContextClassLoader(previous);
|
||||
PlexLog.log("Connected to Redis!");
|
||||
return pool;
|
||||
|
Loading…
Reference in New Issue
Block a user