Dustin C. Hatch a2acdfd0dc mqtt: Manually handle reconnects
The Paho automatic reconnect capability is pretty useless.  While it
does automatically connect to the broker again after an unexpected
disconnect, it does not subscribe to the topics again.  Further, since
the broker will send the will message when the client disconnects
unexpectedly, we need to send our "online" availability message when we
reconnect.

To resolve both of these problems, the `MqttClient::run` method now
takes care reconnecting manually.  When it receives a disconnect
notification, it explicitly calls `AsyncClient::reconnect`.  Once that
succeeds, it resubscribes to the command topics and publishes an
"online" message.
2023-01-08 12:54:32 -06:00
2023-01-08 12:54:32 -06:00
2022-12-30 09:10:05 -06:00
2022-12-30 13:49:01 -06:00
2023-01-07 17:21:17 -06:00
2023-01-07 17:21:17 -06:00
2022-12-30 09:10:05 -06:00
Description
No description provided
211 KiB
Languages
Rust 99.9%
Shell 0.1%