mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-23 04:28:01 +00:00
Don't spam exceptions when pinged after disable
This commit is contained in:
parent
d438186682
commit
7df764c418
@ -122,7 +122,12 @@ public final class RedisBungee extends Plugin {
|
|||||||
final int getCount() {
|
final int getCount() {
|
||||||
int c = 0;
|
int c = 0;
|
||||||
if (pool != null) {
|
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 {
|
try {
|
||||||
for (String i : getServerIds()) {
|
for (String i : getServerIds()) {
|
||||||
c += rsc.scard("proxy:" + i + ":usersOnline");
|
c += rsc.scard("proxy:" + i + ":usersOnline");
|
||||||
|
Loading…
Reference in New Issue
Block a user