Skip to content

Commit

Permalink
fix: specify runtime in tor/init_tor_client
Browse files Browse the repository at this point in the history
  • Loading branch information
binarybaron committed Nov 20, 2024
1 parent 40597b4 commit e3ee35f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion swap/src/cli/tor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<TokioRustlsRuntime>::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))
}

0 comments on commit e3ee35f

Please sign in to comment.