Go to file
Dustin f99c9b5ac6 mqttbutton: Fix MQTT disconnect handler
When the MQTT disconnect handler is called, it would crash the
microcontroller because it was attempting to call `close` on a nil value
`client`. This was supposed to have been `mqtt_client`.

Immediately calling the WiFi timer callback is also a problem, as it
effectively puts the microcontroller into a busy loop if the WiFi is
already connected but the MQTT broker is unavailable. Adding a 1 second
delay here should prevent crashing in this case.
2019-03-28 19:19:49 -05:00
.gitignore Initial commit 2019-03-24 14:12:01 +00:00
config.example.lua Initial commit 2019-03-24 14:12:01 +00:00
init.lua Initial commit 2019-03-24 14:12:01 +00:00
mqttbutton.lua mqttbutton: Fix MQTT disconnect handler 2019-03-28 19:19:49 -05:00