Unregister listener, revert getCount() changes

This commit is contained in:
vemacs 2014-11-26 10:00:05 -07:00
parent e483b9abeb
commit cb61d90d6c
1 changed files with 2 additions and 5 deletions

View File

@ -127,11 +127,7 @@ public final class RedisBungee extends Plugin {
int c = 0;
if (pool != null) {
Jedis rsc;
try {
rsc = pool.getResource();
} catch (JedisConnectionException ignored) { // handle pings after pool shutdown with 0
return c;
}
rsc = pool.getResource();
try {
for (String i : getServerIds()) {
c += rsc.scard("proxy:" + i + ":usersOnline");
@ -333,6 +329,7 @@ public final class RedisBungee extends Plugin {
getProxy().getScheduler().cancel(this);
integrityCheck.cancel();
heartbeatTask.cancel();
getProxy().getPluginManager().unregisterListeners(this);
getLogger().info("Waiting for all tasks to finish.");