-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
questionIt is a question regarding the projectIt is a question regarding the project
Description
Which project is your feature request related to?
- Client
Describe your question
IMqttClient exposes bool IsConnected property. In default implementation it calculates as (MqttClientConnectionStatus)_connectionStatus == MqttClientConnectionStatus.Connected.
So question is why not expose ConnectionStatus directly?
WHY?
Disconnection happened or keepalive failed - need to reconnect.
Even if IIsConnectedprop have been checked there can be case that reconnect shouldn't/mustn't be called (eg in case of client is connecting already)
It would be nice to have public MqttClientConnectionStatus ConnectionStatus { get; } in IMqttClient (there) and it's impl in MqttClient.
Or at least documentation for MQTT-client functional. It's very unclear of what happening inside package:
- What happen if Keep Alive task can't ping server - is there disconnect, disconnect+reconnect, some exception raised?
- Should I reconnect manually if client had been disconnected? Inside of
DisconnectedEventhandler mentioned here? - How can I know there is already a connection establishing (
_connectionStatus == Connecting) without accessing to_connectionStatus? How can I avoid situations where a client is connecting but for some reason I will doConnectAsync/ReconnectAsync?
Metadata
Metadata
Assignees
Labels
questionIt is a question regarding the projectIt is a question regarding the project