mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-24 01:27:35 +01:00
Fix NPE on server stop #740
- not the best, because we will miss that 3 log inside authme.log.
This commit is contained in:
parent
e06c5e7309
commit
2581b95afb
@ -473,13 +473,13 @@ public class AuthMe extends JavaPlugin {
|
||||
pendingTasks.add(pendingTask.getTaskId());
|
||||
}
|
||||
}
|
||||
ConsoleLogger.info("Waiting for " + pendingTasks.size() + " tasks to finish");
|
||||
getLogger().info("Waiting for " + pendingTasks.size() + " tasks to finish");
|
||||
int progress = 0;
|
||||
for (int taskId : pendingTasks) {
|
||||
int maxTries = 5;
|
||||
while (getServer().getScheduler().isCurrentlyRunning(taskId)) {
|
||||
if (maxTries <= 0) {
|
||||
ConsoleLogger.info("Async task " + taskId + " times out after to many tries");
|
||||
getLogger().info("Async task " + taskId + " times out after to many tries");
|
||||
break;
|
||||
}
|
||||
try {
|
||||
@ -490,7 +490,7 @@ public class AuthMe extends JavaPlugin {
|
||||
}
|
||||
|
||||
progress++;
|
||||
ConsoleLogger.info("Progress: " + progress + " / " + pendingTasks.size());
|
||||
getLogger().info("Progress: " + progress + " / " + pendingTasks.size());
|
||||
}
|
||||
if (database != null) {
|
||||
database.close();
|
||||
|
Loading…
Reference in New Issue
Block a user