Login should fail fast.

This commit is contained in:
2023-05-25 14:55:49 -04:00
parent cb0a89cb03
commit d0287ba94e
+8 -7
View File
@@ -116,16 +116,20 @@ public class LoginServer {
// Invalidate cache for players driven by forum
// and stored procedure forum_link_pass()
try {
// Run cache routine right away if requested.
File cacheFile = new File("cacheInvalid");
if (cacheFile.exists() == true) {
nextCacheTime = LocalDateTime.now();
Files.deleteIfExists(Paths.get("cacheInvalid"));
try {
Files.deleteIfExists(Paths.get("cacheInvalid"));
} catch (IOException e) {
throw new RuntimeException(e);
}
}
if (LocalDateTime.now().isAfter(nextCacheTime)) {
@@ -145,10 +149,7 @@ public class LoginServer {
}
ThreadUtils.sleep(100);
} catch (Exception e) {
Logger.error(e);
e.printStackTrace();
}
}
}