Skip to content

Commit

Permalink
fix: v5 doesn't write outgoing packets onto network
Browse files Browse the repository at this point in the history
  • Loading branch information
Devdutt Shenoi committed Apr 7, 2024
1 parent af55848 commit 8ac81cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rumqttc/src/v5/eventloop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ impl EventLoop {
self.options.pending_throttle
), if !self.pending.is_empty() || (!inflight_full && !collision) => match o {
Ok(request) => {
self.state.handle_outgoing_packet(request)?;
if let Some(outgoing) = self.state.handle_outgoing_packet(request)? {
network.write(outgoing).await?;
}
network.flush().await?;
Ok(self.state.events.pop_front().unwrap())
}
Expand Down

0 comments on commit 8ac81cb

Please sign in to comment.