shamblett / mqtt_client

A server and browser based MQTT client for dart
Other
548 stars 176 forks source link

connectionHandler!.connectionStatus and _connectionStatus are not in sync and library is not trying to reconnect #561

Open umer-ilyas opened 3 weeks ago

umer-ilyas commented 3 weeks ago

flutter version: 3.24.1
mqtt_clinet: 10.5.1

sometimes connectionHandler!.connectionStatus.status is MqttConnectionState.connecting

but _connectionStatus.status is MqttConnectionState.disconnected

the state of client is out of sync

I could not save the logs; but in this state client is not trying to reconnect even though auto-reconnect is enabled

image

shamblett commented 3 weeks ago

Whatever output this is doesn't show why 'the client is not trying to reconnect even though auto-reconnect is enabled' it just shows that something called _connectionStatus doesn't match connectionHandler!.connectionStatus for some reason. There are many reasons why the client may not go reconnect even if auto-reconnect is enabled.

What actual proof do you have that this status mismatch causes anything? Without logs of your disconnect and auto reconenct period ther;s nothing I can really do.