From f546de9a6be3cce8eadb09c3ff8546b751e0d96d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 13 Jan 2015 18:36:56 +0100 Subject: [PATCH] Send message when a connection fails. --- src/main/java/net/pterodactylus/xdcc/core/Core.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index 30da4a8..ded98cf 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -536,6 +536,7 @@ public class Core extends AbstractExecutionThreadService { @Subscribe public void connectionClosed(ConnectionClosed connectionClosed) { removeConnection(connectionClosed.connection()); + eventBus.post(new GenericMessage(String.format("Connection closed by %s.", connectionClosed.connection().hostname()))); } /** @@ -547,6 +548,7 @@ public class Core extends AbstractExecutionThreadService { @Subscribe public void connectionFailed(ConnectionFailed connectionFailed) { removeConnection(connectionFailed.connection()); + eventBus.post(new GenericMessage(String.format("Could not connect to %s: %s.", connectionFailed.connection().hostname(), connectionFailed.cause()))); } /** -- 2.7.4