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:
parent
92fc64b713
commit
dd4f49b199
@ -21,7 +21,13 @@ public class UpdateCountTask implements Runnable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (kill) return;
|
if (kill) {
|
||||||
|
if (rsc != null) {
|
||||||
|
plugin.getPool().returnResource(rsc);
|
||||||
|
rsc = null;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
int c = plugin.getProxy().getOnlineCount();
|
int c = plugin.getProxy().getOnlineCount();
|
||||||
rsc.set("server:" + plugin.getServerId() + ":playerCount", String.valueOf(c));
|
rsc.set("server:" + plugin.getServerId() + ":playerCount", String.valueOf(c));
|
||||||
for (String i : plugin.getServers()) {
|
for (String i : plugin.getServers()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user