Skip to content

Commit

Permalink
dns_lookup::LookupErrorKind is now public \o/
Browse files Browse the repository at this point in the history
  • Loading branch information
miquels committed Oct 6, 2018
1 parent 2725df9 commit 330fb12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 1 addition & 5 deletions server/src/hostcache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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|
Expand All @@ -231,14 +230,11 @@ impl HostCache {
},
// Transient error, retry soon.
_ => {
*/
let err : io::Error = e.into();
warn!("resolver: lookup {}: {}", host, err);
(o_addrs, 0)
/*
},
}
*/
}
};

Expand Down

0 comments on commit 330fb12

Please sign in to comment.