added protection to kill current working sub

This commit is contained in:
mohammed jasem alaajel 2020-07-28 10:53:42 +04:00
parent 542884dfe9
commit f4ab43bcb8
2 changed files with 9 additions and 1 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.limework.core</groupId>
<artifactId>LimeworkSpigotCore</artifactId>
<version>1.0.3-SNAPSHOT</version>
<version>1.0.3-fix1-SNAPSHOT</version>
<packaging>jar</packaging>
<build>

View File

@ -179,6 +179,14 @@ public class RedisManager extends BinaryJedisPubSub implements Runnable, Command
, "&c&lYou can not execute this command!!!!!!")));
return true;
}
try {
if (this.subscribeJedis != null) {
this.unsubscribe();
this.subscribeJedis.close();
}
} catch (Exception e) {
e.printStackTrace();
}
start();
return false;
}