peterhinch / micropython-mqtt

A 'resilient' asynchronous MQTT driver. Recovers from WiFi and broker outages.
MIT License
575 stars 126 forks source link

disconnect fix #32

Closed kevinkk525 closed 4 years ago

kevinkk525 commented 4 years ago

Fixes the disconnect to stop _keep_connected and reset _has_connected. Fixes #31

Note that wifi_coro will be called with state False after disconnect and with state True after connect even though the wifi hasn't changed at all. Since there is no disconnected_coro this might be the best approach.