From da6dc375d679d302e379214564913aee7ba6f722 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 28 Jun 2026 18:50:24 +0900 Subject: fix(http): avoid nested tokio runtime panic in download path The CurlDownloader owned a tokio runtime and block_on'd reqwest from its sync tick(), while the repository/installer/downloader sync bridges each created another Runtime and block_on'd async fns that reach that leaf. Driving one Runtime::block_on from within another panics with "Cannot start a runtime from within a runtime", hit by `require` when fetching p2 metadata. Switch CurlDownloader to a blocking reqwest client (its own internal thread, never nested) and replace the per-call Runtime::new().block_on bridges with a no-reactor sync_executor::block_on helper. No awaited future parks on a reactor once the only async I/O is blocking, so the helper can be nested freely. Co-Authored-By: Claude Opus 4.8 (1M context) --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 73ae325..c676f7d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ jsonschema = { version = "0.46.6", default-features = false } md5 = "0.7.0" mockall = "0.14.0" regex = "1.12.3" -reqwest = "0.13.4" +reqwest = { version = "0.13.4", features = ["blocking"] } serde = { version = "1.0.228", features = ["derive"] } serde_json = { version = "1.0.149", features = ["preserve_order"] } serde_urlencoded = "0.7.1" -- cgit v1.3.1