|
@@ -84,7 +84,7 @@ pub async fn run(args: Cli, shutdown_rx: broadcast::Receiver<bool>) -> Result<()
|
|
|
if let Some((i, _)) = last_instance {
|
|
if let Some((i, _)) = last_instance {
|
|
|
info!("General configuration change detected. Restarting...");
|
|
info!("General configuration change detected. Restarting...");
|
|
|
shutdown_tx.send(true)?;
|
|
shutdown_tx.send(true)?;
|
|
|
- i.await??;
|
|
|
|
|
|
|
+ i.await?;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
debug!("{:?}", config);
|
|
debug!("{:?}", config);
|
|
@@ -120,8 +120,8 @@ async fn run_instance(
|
|
|
args: Cli,
|
|
args: Cli,
|
|
|
shutdown_rx: broadcast::Receiver<bool>,
|
|
shutdown_rx: broadcast::Receiver<bool>,
|
|
|
service_update: mpsc::Receiver<ServiceChange>,
|
|
service_update: mpsc::Receiver<ServiceChange>,
|
|
|
-) -> Result<()> {
|
|
|
|
|
- match determine_run_mode(&config, &args) {
|
|
|
|
|
|
|
+) {
|
|
|
|
|
+ let ret: Result<()> = match determine_run_mode(&config, &args) {
|
|
|
RunMode::Undetermine => panic!("Cannot determine running as a server or a client"),
|
|
RunMode::Undetermine => panic!("Cannot determine running as a server or a client"),
|
|
|
RunMode::Client => {
|
|
RunMode::Client => {
|
|
|
#[cfg(not(feature = "client"))]
|
|
#[cfg(not(feature = "client"))]
|
|
@@ -135,7 +135,8 @@ async fn run_instance(
|
|
|
#[cfg(feature = "server")]
|
|
#[cfg(feature = "server")]
|
|
|
run_server(&config, shutdown_rx, service_update).await
|
|
run_server(&config, shutdown_rx, service_update).await
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ };
|
|
|
|
|
+ ret.unwrap();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#[derive(PartialEq, Eq, Debug)]
|
|
#[derive(PartialEq, Eq, Debug)]
|