Notify main loop when we leave a channel.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 13 Jan 2015 20:26:51 +0000 (21:26 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 13 Jan 2015 20:26:51 +0000 (21:26 +0100)
src/main/java/net/pterodactylus/xdcc/core/Core.java

index 3b1e639..1038b4f 100644 (file)
@@ -636,6 +636,9 @@ public class Core extends AbstractExecutionThreadService {
                }
 
                channelsBeingJoined.remove(channel.get());
+               synchronized (syncObject) {
+                       syncObject.notifyAll();
+               }
 
                /* remove all bots for this channel, we might have been kicked. */
                Collection<Bot> botsToRemove = networkBots.row(network.get())
@@ -696,6 +699,9 @@ public class Core extends AbstractExecutionThreadService {
                                } else {
                                        channels.remove(channel.get());
                                }
+                               synchronized (syncObject) {
+                                       syncObject.notifyAll();
+                               }
 
                                eventBus.post(new GenericMessage(String.format("Left Channel %s on %s.", channel.get().name(), channel.get().network().name())));
                        }
@@ -728,6 +734,9 @@ public class Core extends AbstractExecutionThreadService {
                        } else {
                                joinedChannels.remove(channel.get());
                        }
+                       synchronized (syncObject) {
+                               syncObject.notifyAll();
+                       }
                        eventBus.post(new GenericMessage(format(
                                        "Kicked from %s by %s: %s",
                                        kickedFromChannel.channel(),