Skip to content

Commit

Permalink
fix: bug observed in #916 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
Devdutt Shenoi committed Sep 30, 2024
1 parent 6b0c3ec commit f43ea21
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rumqttc/src/v5/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,10 @@ impl MqttState {

let event = Event::Outgoing(Outgoing::Publish(pkid));
self.events.push_back(event);
match (publish.qos, tx) {
(QoS::AtMostOnce, Some(tx)) => tx.resolve(),
(_, tx) => self.ack_waiter[publish.pkid as usize] = tx,
}

Ok(Some(Packet::Publish(publish)))
}
Expand Down

0 comments on commit f43ea21

Please sign in to comment.