Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore subsequent attempts to forward a message
A given MQTT message might be published more than once, notably after a reconnect. For each attempt the rumqttc crate notifies an `Outgoing::Publish(pkid)` event. The first time such an event is received for a given `pkid`, the built-in bridge has to map this `pkid` to the forwarded message (so it will be able to properly acknowledge it later). However, when an acknoledgement is already expected for that `pkid` it means that the `Outgoing::Publish(pkid)` event must be ignored. Failing to do so introduces a shift in the mapping of in and out pkids, and, in the worse case, this blocks the built-in bridge as there is no pending message to associate to. Signed-off-by: Didier Wenzek <[email protected]>
- Loading branch information