Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Temporary workaround to avoid dropping a tokio::runtime while another is running #1991

Merged
merged 1 commit into from
Jul 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/tail/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ impl Tail {
is_cloudflared_installed()?;
print_startup_message(&target.name, tunnel_port, metrics_port);

// Loading the token creates a nested runtime because it goes through reqwest.
// Make sure it's loaded before creating our own runtime; nested runtimes will panic.
target.account_id.load()?;

let runtime = TokioRuntime::new()?;

runtime.block_on(async {
Expand Down