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

Fix error when no other servers were present

This commit is contained in:
Tux 2014-04-26 20:09:53 -04:00
parent 0a2b43e7dc
commit e316e84c2b

View File

@ -175,6 +175,7 @@ public final class RedisBungee extends Plugin {
keys.add("server:" + i + ":usersOnline"); keys.add("server:" + i + ":usersOnline");
} }
if (!keys.isEmpty()) {
Set<String> users = rsc.sunion(keys.toArray(new String[keys.size()])); Set<String> users = rsc.sunion(keys.toArray(new String[keys.size()]));
if (users != null && !users.isEmpty()) { if (users != null && !users.isEmpty()) {
for (String user : users) { for (String user : users) {
@ -183,6 +184,7 @@ public final class RedisBungee extends Plugin {
} }
} }
} }
}
} catch (JedisConnectionException e) { } catch (JedisConnectionException e) {
// Redis server has disappeared! // Redis server has disappeared!
getLogger().log(Level.SEVERE, "Unable to get connection from pool - did your Redis server go away?", e); getLogger().log(Level.SEVERE, "Unable to get connection from pool - did your Redis server go away?", e);