xamarin / mqtt

Minimalist and intuitive MQTT broker and client written entirely in C#

Home Page:http://xamarin.github.io/mqtt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KeepAlive in MqttConfiguration

abrasat opened this issue · comments

I set the KeepAliveSecs parameter to (for instance) 10 (seconds) in the MqttConfiguration, when creating the MqttClient.
Then I physically removed the network cable for the connection to the mqtt broker.
The expected behaviour was to get the MqttClient "Disconnected" event triggered, but instead of that the application crashed with unexpected exception.
When just stopping the Mqtt broker (without removing the network cable), the MqttClient "Disconnected" event is triggered properly.