forked from ChomeNS/chomens-bot-java
fix the skidded code on HBot doing absolutely nothing because i did shutdownNow() instead of shutdown()
This commit is contained in:
parent
d00543593f
commit
729db37cdc
1 changed files with 4 additions and 4 deletions
|
@ -187,17 +187,17 @@ public class Main {
|
||||||
|
|
||||||
// most of these are stolen from HBot
|
// most of these are stolen from HBot
|
||||||
public static void stop () {
|
public static void stop () {
|
||||||
executor.shutdownNow();
|
executor.shutdown();
|
||||||
|
|
||||||
PersistentDataUtilities.stop();
|
PersistentDataUtilities.stop();
|
||||||
|
|
||||||
executorService.shutdownNow();
|
executorService.shutdown();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final boolean executorDone = executor.awaitTermination(5, TimeUnit.SECONDS);
|
final boolean executorDone = executor.awaitTermination(5, TimeUnit.SECONDS);
|
||||||
final boolean executorServiceDone = executorService.awaitTermination(5, TimeUnit.SECONDS);
|
final boolean executorServiceDone = executorService.awaitTermination(5, TimeUnit.SECONDS);
|
||||||
|
|
||||||
if (executorDone || executorServiceDone) {
|
if (!executorDone || !executorServiceDone) {
|
||||||
System.out.println("Executors failed to shut down");
|
System.out.println("Executors failed to shut down");
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
@ -226,7 +226,7 @@ public class Main {
|
||||||
bot.stop();
|
bot.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jda != null) jda.shutdownNow();
|
if (jda != null) jda.shutdown();
|
||||||
|
|
||||||
if (discordEnabled) {
|
if (discordEnabled) {
|
||||||
for (int i = 0; i < 150; i++) {
|
for (int i = 0; i < 150; i++) {
|
||||||
|
|
Loading…
Reference in a new issue