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())));
}
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())));
}