File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ impl EventLoop {
161
161
match self . select ( ) . await {
162
162
Ok ( v) => Ok ( v) ,
163
163
Err ( e) => {
164
+ log:: error!( "connection error : {e}" ) ;
164
165
self . clean ( ) ;
165
166
Err ( e)
166
167
}
Original file line number Diff line number Diff line change @@ -323,7 +323,7 @@ impl MqttState {
323
323
/// Adds next packet identifier to QoS 1 and 2 publish packets and returns
324
324
/// it buy wrapping publish in packet
325
325
fn outgoing_publish ( & mut self , mut publish : Publish ) -> Result < Option < Packet > , StateError > {
326
- if publish. qos != QoS :: AtMostOnce || publish. pkid > self . max_inflight {
326
+ if publish. qos != QoS :: AtMostOnce && publish. pkid <= self . max_inflight {
327
327
if publish. pkid == 0 {
328
328
publish. pkid = self . next_pkid ( ) ;
329
329
}
You can’t perform that action at this time.
0 commit comments