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,