Not detect when disconnect
serkanayaz opened this issue · 5 comments
serkanayaz commented
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.
serkanayaz commented
Sorry, it is detect when disconnected, but after long time.
Salma175 commented
close this issue
serkanayaz commented
I need a mechanism where I can set the KeepAlive field. Or how can I set the KeepAlive field?
Salma175 commented
client.Connect(client_id, userName, password, false, 3)
Last parameter is KeppAlive Period
serkanayaz commented
Thank you very much @Salma175 . It works correctly by setting KeepAlive time short.