mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +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 (sentinel_watcher, sentinel) = PanicSentinelWatcher::create_with_sentinel();
|
||||||
let priv_dropper = PrivilegeDropper::new(config.privileges.clone(), config.socket_workers);
|
let priv_dropper = PrivilegeDropper::new(config.privileges.clone(), config.socket_workers);
|
||||||
|
|
||||||
let opt_tls_config = config
|
let opt_tls_config = if config.network.enable_tls {
|
||||||
.network
|
Some(Arc::new(create_rustls_config(
|
||||||
.enable_tls
|
|
||||||
.then_some(Arc::new(create_rustls_config(
|
|
||||||
&config.network.tls_certificate_path,
|
&config.network.tls_certificate_path,
|
||||||
&config.network.tls_private_key_path,
|
&config.network.tls_private_key_path,
|
||||||
)?));
|
)?))
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
|
|
||||||
let mut executors = Vec::new();
|
let mut executors = Vec::new();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue