Skip to content

Commit

Permalink
fix uninit online vector
Browse files Browse the repository at this point in the history
  • Loading branch information
akiroz committed Feb 5, 2024
1 parent e557792 commit 982640c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zika"
version = "3.4.1"
version = "3.4.2"
license = "MIT"
description = "IP Tunneling over MQTT"
repository = "https://github.com/akiroz/zika"
Expand Down
2 changes: 1 addition & 1 deletion src/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl Remote {
let mut chkr_recv = remote.on_event.resubscribe();
let chkr_online = remote.online.clone();
task::spawn(async move {
let mut broker_state: Vec<bool> = Vec::with_capacity(broker_len);
let mut broker_state: Vec<bool> = (0..broker_len).map(|_| false).collect();
loop {
match chkr_recv.recv().await {
Ok((idx, Packet::ConnAck(_))) => broker_state[idx] = true,
Expand Down

0 comments on commit 982640c

Please sign in to comment.