From 6595c30709032c5d373e1cebf4b3d6ea0c6fe91d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 13 Jan 2015 21:26:51 +0100 Subject: [PATCH] Notify main loop when we leave a channel. --- src/main/java/net/pterodactylus/xdcc/core/Core.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index 3b1e639..1038b4f 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -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 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(), -- 2.7.4