diff --git a/Cargo.lock b/Cargo.lock index afeab09..277a083 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -239,7 +239,7 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "charge-controller-supervisor" -version = "1.9.9-pre-5" +version = "1.9.9-pre-6" dependencies = [ "chrono", "clap", @@ -2201,7 +2201,7 @@ dependencies = [ [[package]] name = "tesla-charge-controller" -version = "1.9.9-pre-5" +version = "1.9.9-pre-6" dependencies = [ "chrono", "clap", diff --git a/Cargo.toml b/Cargo.toml index fa4416d..e5aab03 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ default-members = ["charge-controller-supervisor"] resolver = "2" [workspace.package] -version = "1.9.9-pre-5" +version = "1.9.9-pre-6" [workspace.lints.clippy] pedantic = "warn" diff --git a/charge-controller-supervisor/src/main.rs b/charge-controller-supervisor/src/main.rs index 1444cd6..c0a1588 100644 --- a/charge-controller-supervisor/src/main.rs +++ b/charge-controller-supervisor/src/main.rs @@ -90,7 +90,6 @@ async fn watch(args: Args) -> eyre::Result<()> { match v { Some(Err(e)) => { log::error!("{e:?}"); - std::process::exit(1); } _ => { log::error!("no controller tasks left???"); @@ -98,7 +97,11 @@ async fn watch(args: Args) -> eyre::Result<()> { } } v = server_task => { - log::error!("server exited: {v:#?}"); + if let Err(e)=v { + log::error!("server exited: {e:#?}"); + } else { + std::process::exit(0); + } } }