Skip to content

Commit 4a936fe

Browse files
author
Devdutt Shenoi
committed
fix: panic if max_inflight == u16::MAX
1 parent 656cf74 commit 4a936fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rumqttc/src/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl MqttState {
9898
// TODO: Optimize these sizes later
9999
events: VecDeque::with_capacity(100),
100100
manual_acks,
101-
ack_waiter: (0..max_inflight + 1).map(|_| None).collect(),
101+
ack_waiter: (0..max_inflight as usize + 1).map(|_| None).collect(),
102102
}
103103
}
104104

0 commit comments

Comments
 (0)