Fix logic in server timeout check

This commit is contained in:
Colin McDonald 2016-07-27 16:06:28 -04:00
parent e52d451fa1
commit 3dad944ca3

View File

@ -69,8 +69,8 @@ public final class Server {
for (Server server : serverCache) { for (Server server : serverCache) {
int lastUpdatedAgo = TimeUtils.getSecondsBetween(server.getLastUpdatedAt(), Instant.now()); int lastUpdatedAgo = TimeUtils.getSecondsBetween(server.getLastUpdatedAt(), Instant.now());
if (lastUpdatedAgo < 60 || lastUpdatedAgo > 30 * 5) { if (lastUpdatedAgo < 60 || server.getPlayers().isEmpty()) {
return; continue;
} }
for (UUID online : server.getPlayers()) { for (UUID online : server.getPlayers()) {