mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
ws: don't attempt to parse TLS files when running without TLS
This commit is contained in:
parent
72c66e6e1a
commit
7b06bf8736
3 changed files with 8 additions and 7 deletions
|
|
@ -47,13 +47,14 @@ pub fn run(config: Config) -> ::anyhow::Result<()> {
|
|||
let (sentinel_watcher, sentinel) = PanicSentinelWatcher::create_with_sentinel();
|
||||
let priv_dropper = PrivilegeDropper::new(config.privileges.clone(), config.socket_workers);
|
||||
|
||||
let opt_tls_config = config
|
||||
.network
|
||||
.enable_tls
|
||||
.then_some(Arc::new(create_rustls_config(
|
||||
let opt_tls_config = if config.network.enable_tls {
|
||||
Some(Arc::new(create_rustls_config(
|
||||
&config.network.tls_certificate_path,
|
||||
&config.network.tls_private_key_path,
|
||||
)?));
|
||||
)?))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let mut executors = Vec::new();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue