Don't spam exceptions when pinged after disable

This commit is contained in:
vemacs 2014-11-26 09:15:53 -07:00
parent d438186682
commit 7df764c418
1 changed files with 6 additions and 1 deletions

View File

@ -122,7 +122,12 @@ public final class RedisBungee extends Plugin {
final int getCount() {
int c = 0;
if (pool != null) {
Jedis rsc = pool.getResource();
Jedis rsc;
try {
rsc = pool.getResource();
} catch (IllegalStateException ignored) { // handle pings after pool shutdown with 0
return c;
}
try {
for (String i : getServerIds()) {
c += rsc.scard("proxy:" + i + ":usersOnline");