diff --git a/zenohd/src/main.rs b/zenohd/src/main.rs index bcd57f3735..ddac046770 100644 --- a/zenohd/src/main.rs +++ b/zenohd/src/main.rs @@ -123,7 +123,11 @@ fn config_from_args(args: &Args) -> Config { .config .as_ref() .map_or_else(Config::default, |conf_file| { - Config::from_file(conf_file).unwrap() + Config::from_file(conf_file).unwrap_or_else(|e| { + // if file load fail, wanning it, and load default config + tracing::warn!("Warn: File {} not found! {}", conf_file, e.to_string()); + Config::default() + }) }); if config.mode().is_none() {