diff --git a/server/Cargo.toml b/server/Cargo.toml index c71fcbc..76ed5f1 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -25,7 +25,8 @@ nntp-rs-spool = { path = "../spool" } nntp-rs-util = { path = "../util" } num_cpus = "1.8.0" time = "0.1.40" -dns-lookup = "0.9.1" +#dns-lookup = "0.9.1" +dns-lookup = { git = "https://github.com/keeperofdakeys/dns-lookup" } ipnet = "2.0.0" parking_lot = "0.6.4" regex = "1.0.5" diff --git a/server/src/hostcache.rs b/server/src/hostcache.rs index 91aa2db..3588ab0 100644 --- a/server/src/hostcache.rs +++ b/server/src/hostcache.rs @@ -9,7 +9,7 @@ use std::sync::{Arc,mpsc}; use std::time::Duration; use std::thread; -use dns_lookup::{self,AddrInfoHints,SockType}; +use dns_lookup::{self,AddrInfoHints,SockType,LookupErrorKind}; use nntp_rs_util as util; use parking_lot::Mutex; @@ -221,7 +221,6 @@ impl HostCache { Err(e) => { // XXX FIXME as soon as dns-lookup exposes LookupErrorKind. // https://github.com/keeperofdakeys/dns-lookup/issues/10 - /* match e.kind() { // NXDOMAIN or NODATA - normal retry time. LookupErrorKind::NoName| @@ -231,14 +230,11 @@ impl HostCache { }, // Transient error, retry soon. _ => { - */ let err : io::Error = e.into(); warn!("resolver: lookup {}: {}", host, err); (o_addrs, 0) - /* }, } - */ } };