mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01:00
Fix MQTT status message when disconnected while connecting (#2951)
Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
parent
fe5b1ed6ac
commit
bf54474b03
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user