diff --git a/rumqttc/src/v5/eventloop.rs b/rumqttc/src/v5/eventloop.rs index ab1edb17c..1f7ee3944 100644 --- a/rumqttc/src/v5/eventloop.rs +++ b/rumqttc/src/v5/eventloop.rs @@ -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()) }