Better error handling

pull/5/head
Frank Denis 5 years ago
parent 41f4d77212
commit 653c4e1de7

@ -527,7 +527,14 @@ fn main() -> Result<(), Error> {
updater.update();
}
runtime.spawn(updater.run());
runtime.spawn(start(globals, runtime.clone()).map(|_| ()));
runtime.spawn(
start(globals, runtime.clone())
.map_err(|e| {
error!("Unable to start the service: [{}]", e);
std::process::exit(1);
})
.map(|_| ()),
);
runtime.block_on(future::pending::<()>());
Ok(())

Loading…
Cancel
Save