From e3ee35f51f41130056938c5ca8ec384bad511b8a Mon Sep 17 00:00:00 2001 From: Binarybaron Date: Wed, 20 Nov 2024 15:12:36 +0100 Subject: [PATCH] fix: specify runtime in tor/init_tor_client --- swap/src/cli/tor.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/swap/src/cli/tor.rs b/swap/src/cli/tor.rs index 598d98ec4..bac1f2074 100644 --- a/swap/src/cli/tor.rs +++ b/swap/src/cli/tor.rs @@ -21,7 +21,12 @@ pub async fn init_tor_client( // Start the Arti client, and let it bootstrap a connection to the Tor network. // (This takes a while to gather the necessary directory information. // It uses cached information when possible.) - let tor_client = TorClient::::create_bootstrapped(config).await?; + let runtime = TokioRustlsRuntime::current().expect("We are always running with tokio"); + + let tor_client = TorClient::with_runtime(runtime) + .config(config) + .create_bootstrapped() + .await?; Ok(Arc::new(tor_client)) }