2 Commits

View File

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