From ba48fdc5646e7b1931a6ba01aa8016c7c6893e37 Mon Sep 17 00:00:00 2001 From: Govindass Date: Sat, 24 Oct 2020 12:32:36 +0300 Subject: [PATCH] Revert "Update RedisManager.java" This reverts commit 6c5d580b16a3bcdbb04f57efdbf1e0031bca1d17. --- .../java/net/limework/core/managers/RedisManager.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/limework/core/managers/RedisManager.java b/src/main/java/net/limework/core/managers/RedisManager.java index 3eebfa1..67b7257 100644 --- a/src/main/java/net/limework/core/managers/RedisManager.java +++ b/src/main/java/net/limework/core/managers/RedisManager.java @@ -60,9 +60,6 @@ public class RedisManager extends BinaryJedisPubSub implements Runnable { } public void start() { - if (isShuttingDown.get()) { - isShuttingDown.set(false); - } this.RedisService.execute(this); } @@ -151,10 +148,9 @@ public class RedisManager extends BinaryJedisPubSub implements Runnable { this.RedisService.shutdown(); } - public void reload() { - shutdown(); plugin.reloadConfig(); + subscribeJedis.close(); Configuration config = this.plugin.getConfig(); JedisPoolConfig JConfig = new JedisPoolConfig(); JConfig.setMaxTotal(config.getInt("Redis.MaxConnections")); @@ -167,7 +163,7 @@ public class RedisManager extends BinaryJedisPubSub implements Runnable { config.getInt("Redis.TimeOut"), config.getString("Redis.Password"), config.getBoolean("Redis.useSSL")); - RedisService.shutdown(); + RedisService.shutdownNow(); RedisService = Executors.newFixedThreadPool(config.getInt("Redis.Threads")); try { this.subscribeJedis = this.jedisPool.getResource(); @@ -175,7 +171,6 @@ public class RedisManager extends BinaryJedisPubSub implements Runnable { } this.channels = config.getStringList("Channels"); encryption = new Encryption(config); - start(); } public JedisPool getJedisPool() {