fix: handle crashing or fast exiting monado-service properly (#9)

This commit is contained in:
Gabriele Musco 2023-06-15 21:57:48 +02:00
parent 02eb266e8f
commit a97560d0d1
No known key found for this signature in database
GPG key ID: 1068D795C80E51DE

View file

@ -141,15 +141,21 @@ impl SimpleComponent for App {
Msg::UpdateView => {
match &mut self.monado_runner {
None => {}
Some(runner) => match runner.status() {
RunnerStatus::Running => {
self.monado_log.extend(runner.consume_rows());
Some(runner) => {
let n_rows = runner.consume_rows();
if !n_rows.is_empty() {
self.monado_log.extend(n_rows);
self.debug_view
.sender()
.emit(DebugViewMsg::LogUpdated(self.monado_log.clone()));
}
_ => {}
},
match runner.status() {
RunnerStatus::Running => {},
RunnerStatus::Stopped => {
self.main_view.sender().emit(MainViewMsg::MonadoActiveChanged(false));
}
};
}
};
match &mut self.build_pipeline {
None => {}