This commit is contained in:
Jacob Hoffman-Andrews
2021-10-06 23:51:43 -07:00
committed by Martin Algesten
parent 5fa912c4d3
commit 3bc7d8336b

View File

@@ -363,7 +363,7 @@ pub(crate) fn connect_https(unit: &Unit, hostname: &str) -> Result<Stream, Error
.tls_config
.as_ref()
.map(|c| c.0.clone())
.unwrap_or(TLS_CONF.clone());
.unwrap_or_else(|| TLS_CONF.clone());
let mut sock = connect_host(unit, hostname, port)?;
let mut sess = rustls::ClientConnection::new(
tls_conf,