fix: don't attempt to reconnect when the bot is stopping

This commit is contained in:
ChomeNS
2025-05-05 13:20:00 +07:00
parent 14ab8a7bda
commit 8a868052f5
2 changed files with 4 additions and 3 deletions

View File

@@ -363,6 +363,8 @@ public class Bot extends SessionAdapter {
if (printDisconnectedCause && cause != null) logger.error(cause);
if (Main.stopping) return;
if (!isTransferring) cookies.clear();
int reconnectDelay = options.reconnectDelay;

View File

@@ -44,7 +44,7 @@ public class Main {
private static boolean alreadyStarted = false;
private static boolean stopping = false;
public static boolean stopping = false;
private static int backupFailTimes = 0;
@@ -180,8 +180,7 @@ public class Main {
public static void stop (final int exitCode, final String reason, final String type, final boolean callSystemExit) {
if (stopping) return;
stopping = true;
else stopping = true;
final String stoppingMessage = String.format(
"%s (%s)",