X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fxdcc%2Fcore%2FCore.java;h=30da4a88cb9b66cfff1dd572cf6b8a5376273b11;hb=e89d921415a0ae26ebb5bb7cee7a1e72fc0418b4;hp=73552830840671c49b0d90e3ee57d2382ad97c11;hpb=cf0ba5267e5ae852c9384562f1674e87c47c0715;p=xudocci.git diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index 7355283..30da4a8 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -384,6 +384,9 @@ public class Core extends AbstractExecutionThreadService { /* ignore. */ } } + if (!isRunning()) { + break; + } /* find channels that should be monitored but are not. */ for (Channel channel : channels) { @@ -411,7 +414,7 @@ public class Core extends AbstractExecutionThreadService { } @Override - protected void shutDown() { + protected void triggerShutdown() { synchronized (syncObject) { syncObject.notifyAll(); } @@ -674,9 +677,9 @@ public class Core extends AbstractExecutionThreadService { return; } - extraChannels.remove(channel); + extraChannels.remove(channel.get()); } else { - channels.remove(channel.get()); + joinedChannels.remove(channel.get()); } eventBus.post(new GenericMessage(format( "Kicked from %s by %s: %s",