eclipse/paho.mqtt.m2mqtt

Not detect when disconnect

serkanayaz opened this issue · 5 comments

Hi,

Library is not detect when disconnect.

Scenario: Library is connect to any mqtt server and internet is disconnect (or disable wifi). Now, Should be run Mqtt_ConnectionClosed event but not run.

Best regard.

Sorry, it is detect when disconnected, but after long time.

close this issue

I need a mechanism where I can set the KeepAlive field. Or how can I set the KeepAlive field?

client.Connect(client_id, userName, password, false, 3)
Last parameter is KeppAlive Period

Thank you very much @Salma175 . It works correctly by setting KeepAlive time short.