clean up transient state on boot (#816)

* Should Work™

* fix remove

* do not sleep on exit 0
This commit is contained in:
Aiden McClelland
2021-11-22 17:59:28 -07:00
parent 3a9bfd08a9
commit 1effb50b79
6 changed files with 199 additions and 54 deletions

View File

@@ -394,13 +394,7 @@ async fn manager_thread_loop(mut recv: Receiver<OnStop>, thread_shared: &Arc<Man
}
}
match run_main(&thread_shared).await {
Ok(Ok(NoOutput)) => {
thread_shared
.on_stop
.send(OnStop::Sleep)
.map_err(|_| ())
.unwrap(); // recv is still in scope, cannot fail
}
Ok(Ok(NoOutput)) => (), // restart
Ok(Err(e)) => {
let res = thread_shared.ctx.notification_manager
.notify(