mqtt-async-client-rs icon indicating copy to clipboard operation
mqtt-async-client-rs copied to clipboard

Add support for draining publish events before shutting down.

Open nathanielc opened this issue 3 years ago • 0 comments
trafficstars

This change does two things:

  1. Adds logic to drain rx_io_requests on shutdown, this ensures that all outgoing requests to the MQTT broken are processed by the IoTask before the task is shutdown.
  2. 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.

nathanielc avatar Jul 21 '22 19:07 nathanielc