os specific config
@@ -123,6 +123,8 @@ impl Supervised for Connector {}
impl actix::ArbiterService for Connector {}
impl Default for Connector {
+
+ #[cfg(any(unix, target_os = "windows"))]
fn default() -> Connector {
let resolver = match ResolverFuture::from_system_conf(Arbiter::handle()) {
Ok(resolver) => resolver,
@@ -136,6 +138,15 @@ impl Default for Connector {
};
Connector{resolver: resolver}
}
+
+ #[cfg(not(any(unix, target_os = "windows")))]
+ fn default() -> Connector {
+ let resolver = ResolverFuture::new(
+ ResolverConfig::default(),
+ ResolverOpts::default(),
+ Arbiter::handle());
+ Connector{resolver: resolver}
+ }
}
impl Handler<Resolve> for Connector {
