diff --git a/pom.xml b/pom.xml
index 3d5c44b..3d78e82 100644
--- a/pom.xml
+++ b/pom.xml
@@ -112,7 +112,7 @@
org.apache.commons
commons-pool2
- 2.3
+ 2.4.2
compile
diff --git a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java
index b7533c3..d88e9d3 100644
--- a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java
+++ b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java
@@ -427,19 +427,10 @@ public final class RedisBungee extends Plugin {
FutureTask task = new FutureTask<>(new Callable() {
@Override
public JedisPool call() throws Exception {
- // With recent versions of Jedis, we must set the classloader to the one BungeeCord used
- // to load RedisBungee with.
- ClassLoader previous = Thread.currentThread().getContextClassLoader();
- Thread.currentThread().setContextClassLoader(RedisBungee.class.getClassLoader());
-
// Create the pool...
JedisPoolConfig config = new JedisPoolConfig();
config.setMaxTotal(configuration.getInt("max-redis-connections", 8));
- JedisPool pool = new JedisPool(config, redisServer, redisPort, 0, finalRedisPassword);
-
- // Reset classloader and return the pool
- Thread.currentThread().setContextClassLoader(previous);
- return pool;
+ return new JedisPool(config, redisServer, redisPort, 0, finalRedisPassword);
}
});