2 Commits

View File

@@ -109,10 +109,14 @@ impl Main {
} }
fn exchange_recv(&mut self) { fn exchange_recv(&mut self) {
match self.c.try_recv() { loop {
Ok(msg) => self.ntfy2 = msg, match self.c.try_recv() {
_ => {}, Ok(msg) => {
}; self.ntfy2 = msg
},
_ => return,
};
}
} }
fn exchange_send(&mut self) { fn exchange_send(&mut self) {
@@ -343,7 +347,9 @@ impl Feedback {
loop { loop {
std::thread::sleep(std::time::Duration::from_secs(2)); std::thread::sleep(std::time::Duration::from_secs(2));
match self.read() { match self.read() {
Some(msg) if msg.len() > 0 => self.write(msg), Some(msg) if msg.len() > 0 => {
self.write(msg.clone());
},
_ => {}, _ => {},
}; };
} }