Skip to content

Commit

Permalink
Remove a sender
Browse files Browse the repository at this point in the history
  • Loading branch information
VanuPhantom committed Jul 12, 2024
1 parent 864a6cc commit 9eeb7ed
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/mqtt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ impl<F: Fn() -> Config + std::marker::Send + 'static> Listener<F> {
.subscribe(format!("screens/{}", id), rumqttc::QoS::AtLeastOnce)
.unwrap();

let sender = self.sender.clone();

for event in connection.iter() {
println!("{:?}", event);

Expand All @@ -44,7 +42,7 @@ impl<F: Fn() -> Config + std::marker::Send + 'static> Listener<F> {
continue 'outer;
}

sender.send(command).unwrap();
self.sender.send(command).unwrap();
}
}
}
Expand Down

0 comments on commit 9eeb7ed

Please sign in to comment.