From e4c5d3fcd78b8c1ec4d1c84a40028c2bdedc3577 Mon Sep 17 00:00:00 2001 From: Julian Chang Date: Sun, 19 Jul 2026 11:46:48 +0900 Subject: [PATCH] Dont use hickory on Windows --- packages/oneclient_core/src/http/service.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/oneclient_core/src/http/service.rs b/packages/oneclient_core/src/http/service.rs index 357867a2..588344c2 100644 --- a/packages/oneclient_core/src/http/service.rs +++ b/packages/oneclient_core/src/http/service.rs @@ -102,8 +102,8 @@ impl RequestClient { } pub fn new() -> Result { - let client = ClientBuilder::new() - .hickory_dns(true) + #[cfg_attr(target_os = "windows", allow(unused_mut))] + let mut builder = ClientBuilder::new() .connect_timeout(std::time::Duration::from_secs(10)) .read_timeout(std::time::Duration::from_secs(30)) .timeout(std::time::Duration::from_mins(10)) @@ -112,8 +112,14 @@ impl RequestClient { "OneClient {} ({})", env!("CARGO_PKG_VERSION"), env!("CARGO_PKG_HOMEPAGE") - )) - .build()?; + )); + + #[cfg(not(target_os = "windows"))] + { + builder = builder.hickory_dns(true); + } + + let client = builder.build()?; Ok(Self { client,