X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fxdcc%2Fcore%2FCore.java;h=c2eaae8633d5bc6c8df4205a3686b08100c6b761;hb=b6341e3bc7a87371e9b4f1734fccda3a2959bed2;hp=f7b05952cd50ed46ee7255163a48cee125cc7236;hpb=f44a2c07039e9f86fbc5927f6ba097d9d42b3e21;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 f7b0595..c2eaae8 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -571,6 +571,9 @@ public class Core extends AbstractExecutionThreadService { public void connectionClosed(ConnectionClosed connectionClosed) { connectionBackoff.connectionFailed(getNetwork(connectionClosed.connection()).get()); removeConnection(connectionClosed.connection()); + synchronized (syncObject) { + syncObject.notifyAll(); + } eventBus.post(new GenericMessage(String.format("Connection closed by %s.", connectionClosed.connection().hostname()))); } @@ -584,6 +587,9 @@ public class Core extends AbstractExecutionThreadService { public void connectionFailed(ConnectionFailed connectionFailed) { connectionBackoff.connectionFailed(getNetwork(connectionFailed.connection()).get()); removeConnection(connectionFailed.connection()); + synchronized (syncObject) { + syncObject.notifyAll(); + } eventBus.post(new GenericMessage(String.format("Could not connect to %s: %s.", connectionFailed.connection().hostname(), connectionFailed.cause()))); }