refactor
This commit is contained in:
parent
d7d782499a
commit
2ee82c696d
2 changed files with 5 additions and 2 deletions
|
|
@ -32,7 +32,7 @@ pub fn parse_opts(globals: &mut Globals) -> Result<()> {
|
||||||
ConfigToml::default()
|
ConfigToml::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
// listen port and scket
|
// listen port and socket
|
||||||
globals.http_port = config.listen_port;
|
globals.http_port = config.listen_port;
|
||||||
globals.https_port = config.listen_port_tls;
|
globals.https_port = config.listen_port_tls;
|
||||||
ensure!(
|
ensure!(
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,10 @@ fn main() {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
parse_opts(&mut globals).expect("Invalid configuration");
|
if let Err(e) = parse_opts(&mut globals) {
|
||||||
|
error!("Invalid configuration: {}", e);
|
||||||
|
std::process::exit(1);
|
||||||
|
};
|
||||||
|
|
||||||
entrypoint(Arc::new(globals)).await.unwrap()
|
entrypoint(Arc::new(globals)).await.unwrap()
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue