diff --git a/bundles/org.openhab.core.io.transport.mqtt/src/main/java/org/openhab/core/io/transport/mqtt/MqttBrokerConnection.java b/bundles/org.openhab.core.io.transport.mqtt/src/main/java/org/openhab/core/io/transport/mqtt/MqttBrokerConnection.java index e857917fd..7688c37b5 100644 --- a/bundles/org.openhab.core.io.transport.mqtt/src/main/java/org/openhab/core/io/transport/mqtt/MqttBrokerConnection.java +++ b/bundles/org.openhab.core.io.transport.mqtt/src/main/java/org/openhab/core/io/transport/mqtt/MqttBrokerConnection.java @@ -162,10 +162,9 @@ public class MqttBrokerConnection { public void onDisconnected(Throwable t) { cancelTimeoutFuture.run(); - - final MqttConnectionState connectionState = connection.connectionState(); future.complete(false); - connection.connectionObservers.forEach(o -> o.connectionStateChanged(connectionState, t)); + + connection.connectionObservers.forEach(o -> o.connectionStateChanged(MqttConnectionState.DISCONNECTED, t)); // If we tried to connect via start(), use the reconnect strategy to try it again if (connection.isConnecting) {