9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-26 01:59:20 +00:00

Fix rare EndOfStream exception with Jedis listener

This commit is contained in:
William
2022-02-06 14:56:48 +00:00
parent 9bf0fe7bb9
commit 049dcbe589

View File

@@ -24,14 +24,18 @@ public abstract class RedisListener {
* Creates a new RedisListener and initialises the Redis connection
*/
public RedisListener() {
JedisPoolConfig config = new JedisPoolConfig();
config.setMaxIdle(0);
config.setTestOnBorrow(true);
config.setTestOnReturn(true);
if (Settings.redisPassword.isEmpty()) {
jedisPool = new JedisPool(new JedisPoolConfig(),
jedisPool = new JedisPool(config,
Settings.redisHost,
Settings.redisPort,
0,
Settings.redisSSL);
} else {
jedisPool = new JedisPool(new JedisPoolConfig(),
jedisPool = new JedisPool(config,
Settings.redisHost,
Settings.redisPort,
0,