mqtt-async-client-rs
mqtt-async-client-rs copied to clipboard
Add support for draining publish events before shutting down.
trafficstars
This change does two things:
- Adds logic to drain
rx_io_requestson shutdown, this ensures that all outgoing requests to the MQTT broken are processed by the IoTask before the task is shutdown. - Changes the behavior of a zero read from the client. A zero read does not indicate a disconnect from the broker and so this change simply ignores zero reads and continues processing.
I have been using these changes locally for a few weeks without issue now.