From 3d80ac2ebbbb890e7ed180f58445cecaa7143a2b Mon Sep 17 00:00:00 2001 From: Darren M Date: Sun, 21 Jul 2024 19:33:42 -0700 Subject: [PATCH] Fix tls pool (#4910) * Cargo: add rustls as a dependency * install tls provider in main * Cargo: re-define rustls dependency --- Cargo.toml | 1 + crates/db_schema/src/utils.rs | 4 ---- src/main.rs | 6 ++++++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 461a6cc84..ca0598f82 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -203,6 +203,7 @@ opentelemetry = { workspace = true, optional = true } console-subscriber = { version = "0.3.0", optional = true } opentelemetry-otlp = { version = "0.12.0", optional = true } pict-rs = { version = "0.5.15", optional = true } +rustls = { workspace = true } tokio.workspace = true actix-cors = "0.7.0" futures-util = { workspace = true } diff --git a/crates/db_schema/src/utils.rs b/crates/db_schema/src/utils.rs index ec9f9ded7..bcddce19b 100644 --- a/crates/db_schema/src/utils.rs +++ b/crates/db_schema/src/utils.rs @@ -327,10 +327,6 @@ fn establish_connection(config: &str) -> BoxFuture LemmyResult<()> { init_logging(&SETTINGS.opentelemetry_url)?; let args = CmdArgs::parse(); + rustls::crypto::ring::default_provider() + .install_default() + .expect("Failed to install rustls crypto provider"); + #[cfg(not(feature = "embed-pictrs"))] start_lemmy_server(args).await?; #[cfg(feature = "embed-pictrs")]