From 32a2ae0d7b1a0616cc92d8a6cdc6bca89dd92d2b Mon Sep 17 00:00:00 2001 From: Vankka Date: Sun, 10 Nov 2024 22:00:36 +0200 Subject: [PATCH] Move to connecting on thread --- .../common/discord/connection/jda/JDAConnectionManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/discordsrv/common/discord/connection/jda/JDAConnectionManager.java b/common/src/main/java/com/discordsrv/common/discord/connection/jda/JDAConnectionManager.java index b70aa39d..40de7ef6 100644 --- a/common/src/main/java/com/discordsrv/common/discord/connection/jda/JDAConnectionManager.java +++ b/common/src/main/java/com/discordsrv/common/discord/connection/jda/JDAConnectionManager.java @@ -293,7 +293,10 @@ public class JDAConnectionManager implements DiscordConnectionManager { throw new IllegalStateException("Cannot reconnect, still active"); } - return connectionFuture = discordSRV.scheduler().execute(this::connectInternal); + this.connectInternal(); + return CompletableFuture.completedFuture(null); + // TODO: investigate why this is broken + //return connectionFuture = discordSRV.scheduler().execute(this::connectInternal); } private void connectInternal() {