2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-22 20:28:00 +00:00

Return Jedis resource to the pool.

This commit is contained in:
Tux 2013-10-15 11:18:04 -04:00
parent 92fc64b713
commit dd4f49b199

View File

@ -21,7 +21,13 @@ public class UpdateCountTask implements Runnable {
@Override
public void run() {
if (kill) return;
if (kill) {
if (rsc != null) {
plugin.getPool().returnResource(rsc);
rsc = null;
}
return;
}
int c = plugin.getProxy().getOnlineCount();
rsc.set("server:" + plugin.getServerId() + ":playerCount", String.valueOf(c));
for (String i : plugin.getServers()) {