fix: actually handle stopping the database when the bot is stopping

This commit is contained in:
ChomeNS
2024-12-14 16:54:28 +07:00
parent 6a11f237ef
commit 5a06ee53b6
3 changed files with 13 additions and 1 deletions

View File

@@ -148,6 +148,8 @@ public class Main {
executorService.shutdown();
database.stop();
try {
final boolean ignoredExecutorDone = executor.awaitTermination(5, TimeUnit.SECONDS);
final boolean ignoredExecutorServiceDone = executorService.awaitTermination(5, TimeUnit.SECONDS);