Return Jedis resource to the pool.

This commit is contained in:
Tux 2013-10-15 11:18:04 -04:00
parent 92fc64b713
commit dd4f49b199
1 changed files with 7 additions and 1 deletions

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()) {