From a94f83c63a742aad3deeeb110032b3a3efc9da58 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 10 Aug 2013 22:54:45 +0200 Subject: [PATCH] Catch exceptions when trying to join channels. --- src/main/java/net/pterodactylus/xdcc/core/Core.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index e2710e4..240beb1 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -345,7 +345,11 @@ public class Core extends AbstractExecutionThreadService { Connection connection = networkConnections.get(channel.network()); if (connection.established()) { eventBus.post(new GenericMessage(String.format("Trying to join %s on %s.", channel.name(), channel.network().name()))); - connection.joinChannel(channel.name()); + try { + connection.joinChannel(channel.name()); + } catch (IOException ioe1) { + eventBus.post(new GenericMessage(String.format("Could not join %s on %s.", channel.name(), channel.network().name()))); + } } } } -- 2.7.4