Properly shutdown Redis

This commit is contained in:
Braydon 2023-12-16 15:51:33 -05:00
parent 0742ab40d7
commit 3119173d87

@ -57,7 +57,7 @@ public class Redis implements IDatabase<StatefulRedisConnection<String, String>,
throw new IllegalStateException("Already connected");
}
if (client != null) { // We have a client, close it first
client.close();
client.shutdown();
}
if (connection != null) { // We have a connection, close it first
connection.close();
@ -146,7 +146,7 @@ public class Redis implements IDatabase<StatefulRedisConnection<String, String>,
@Override
public void close() {
if (client != null) {
client.close();
client.shutdown();
}
if (connection != null) {
connection.close();