mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-24 09:37:42 +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());
|
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;
|
int progress = 0;
|
||||||
for (int taskId : pendingTasks) {
|
for (int taskId : pendingTasks) {
|
||||||
int maxTries = 5;
|
int maxTries = 5;
|
||||||
while (getServer().getScheduler().isCurrentlyRunning(taskId)) {
|
while (getServer().getScheduler().isCurrentlyRunning(taskId)) {
|
||||||
if (maxTries <= 0) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@ -490,7 +490,7 @@ public class AuthMe extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
progress++;
|
progress++;
|
||||||
ConsoleLogger.info("Progress: " + progress + " / " + pendingTasks.size());
|
getLogger().info("Progress: " + progress + " / " + pendingTasks.size());
|
||||||
}
|
}
|
||||||
if (database != null) {
|
if (database != null) {
|
||||||
database.close();
|
database.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user