Skip to content

Commit f43ea21

Browse files
author
Devdutt Shenoi
committed
fix: bug observed in #916 (comment)
1 parent 6b0c3ec commit f43ea21

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rumqttc/src/v5/state.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,10 @@ impl MqttState {
576576

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

580584
Ok(Some(Packet::Publish(publish)))
581585
}

0 commit comments

Comments
 (0)