Fix MQTT status message when disconnected while connecting (#2951)
Signed-off-by: Jan N. Klug <github@klug.nrw>pull/2974/head
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