From eca5e5ecf5e5b902b3128abd1a2daf46d0aabcac Mon Sep 17 00:00:00 2001 From: yHSJ Date: Tue, 10 Dec 2024 17:44:41 -0500 Subject: [PATCH] chore: fix matchmaker auto matching --- app/src/main/java/fi/sundae/bot/Bot.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/fi/sundae/bot/Bot.java b/app/src/main/java/fi/sundae/bot/Bot.java index 8b3e0c9..49583d4 100644 --- a/app/src/main/java/fi/sundae/bot/Bot.java +++ b/app/src/main/java/fi/sundae/bot/Bot.java @@ -39,7 +39,7 @@ public Bot(String token, String ownerId, String channelId, String adminRoleId) { } private void scheduleMatchmaking(JDA jda) { - try (ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor()) { + ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(); executor.scheduleAtFixedRate( () -> { List matches = MATCHMAKER.buildAllMatches(); @@ -48,6 +48,5 @@ private void scheduleMatchmaking(JDA jda) { 0, 5, TimeUnit.MINUTES); - } } }