mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2025-04-20 01:27:07 +00:00
Unregister listener, revert getCount() changes
This commit is contained in:
parent
e483b9abeb
commit
cb61d90d6c
@ -127,11 +127,7 @@ public final class RedisBungee extends Plugin {
|
|||||||
int c = 0;
|
int c = 0;
|
||||||
if (pool != null) {
|
if (pool != null) {
|
||||||
Jedis rsc;
|
Jedis rsc;
|
||||||
try {
|
rsc = pool.getResource();
|
||||||
rsc = pool.getResource();
|
|
||||||
} catch (JedisConnectionException ignored) { // handle pings after pool shutdown with 0
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
for (String i : getServerIds()) {
|
for (String i : getServerIds()) {
|
||||||
c += rsc.scard("proxy:" + i + ":usersOnline");
|
c += rsc.scard("proxy:" + i + ":usersOnline");
|
||||||
@ -333,6 +329,7 @@ public final class RedisBungee extends Plugin {
|
|||||||
getProxy().getScheduler().cancel(this);
|
getProxy().getScheduler().cancel(this);
|
||||||
integrityCheck.cancel();
|
integrityCheck.cancel();
|
||||||
heartbeatTask.cancel();
|
heartbeatTask.cancel();
|
||||||
|
getProxy().getPluginManager().unregisterListeners(this);
|
||||||
|
|
||||||
getLogger().info("Waiting for all tasks to finish.");
|
getLogger().info("Waiting for all tasks to finish.");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user