Fix Redis hanging

This commit is contained in:
2022-02-04 13:30:05 -06:00
parent c93bd4fd2c
commit 140f298018
5 changed files with 41 additions and 15 deletions

View File

@ -41,6 +41,7 @@ public class PunishmentManager extends PlexBase
{
plugin.getRedisConnection().getJedis().set(player.getUuid(), object.toString());
PlexLog.debug("Added " + player.getUuid() + "'s punishment to the Redis database.");
plugin.getRedisConnection().getJedis().close();
}
FileWriter writer = new FileWriter(file);
@ -62,6 +63,7 @@ public class PunishmentManager extends PlexBase
{
plugin.getRedisConnection().getJedis().set(player.getUuid(), object.toString());
PlexLog.debug("Added " + player.getUuid() + "'s punishment to the Redis database.");
plugin.getRedisConnection().getJedis().close();
}
FileWriter writer = new FileWriter(file);