fix: hopefully fix errors on stopping

This commit is contained in:
ChomeNS
2025-06-16 18:05:43 +07:00
parent c4e7c9e799
commit 2fb5dad02c
2 changed files with 6 additions and 6 deletions

View File

@@ -188,11 +188,6 @@ public class Main {
LoggerUtilities.log(stoppingMessage);
EXECUTOR.shutdown();
EXECUTOR_SERVICE.shutdown();
FileLoggerUtilities.stop();
if (database != null) database.stop();
final ArrayList<Bot> copiedList;
synchronized (bots) {
copiedList = new ArrayList<>(bots);
@@ -238,6 +233,11 @@ public class Main {
if (discord != null && discord.jda != null) discord.jda.shutdown();
}
EXECUTOR.shutdown();
EXECUTOR_SERVICE.shutdown();
FileLoggerUtilities.stop();
if (database != null) database.stop();
if (callSystemExit) System.exit(exitCode);
}
}