Skip to content

Commit d2a2c73

Browse files
committed
runtime: remove blocking startup sleep and System.exit from DiscordApp
1 parent 6fb3c0a commit d2a2c73

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/com/eternalcode/discordapp/DiscordApp.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,11 @@ private void start() {
8989

9090
Runtime.getRuntime().addShutdownHook(new Thread(this::shutdown));
9191
LOGGER.info("Discord Application started successfully!");
92-
Thread.sleep(Long.MAX_VALUE);
9392
}
9493
catch (Exception exception) {
9594
LOGGER.error("Failed to start Discord Application", exception);
9695
Sentry.captureException(exception);
97-
System.exit(1);
96+
throw new IllegalStateException("Discord Application startup failed", exception);
9897
}
9998
}
10099

0 commit comments

Comments
 (0)