From 3dad944ca39e3167d83c68c90bde697dc9feeb1e Mon Sep 17 00:00:00 2001 From: Colin McDonald Date: Wed, 27 Jul 2016 16:06:28 -0400 Subject: [PATCH] Fix logic in server timeout check --- src/main/java/net/frozenorb/apiv3/model/Server.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/frozenorb/apiv3/model/Server.java b/src/main/java/net/frozenorb/apiv3/model/Server.java index b494236..aa601a1 100644 --- a/src/main/java/net/frozenorb/apiv3/model/Server.java +++ b/src/main/java/net/frozenorb/apiv3/model/Server.java @@ -69,8 +69,8 @@ public final class Server { for (Server server : serverCache) { int lastUpdatedAgo = TimeUtils.getSecondsBetween(server.getLastUpdatedAt(), Instant.now()); - if (lastUpdatedAgo < 60 || lastUpdatedAgo > 30 * 5) { - return; + if (lastUpdatedAgo < 60 || server.getPlayers().isEmpty()) { + continue; } for (UUID online : server.getPlayers()) {