mirror of
https://github.com/zaphar/durnitisp.git
synced 2025-07-21 18:10:27 -04:00
Dont hard fail on resolve errors
This commit is contained in:
parent
632b14e6b2
commit
770b160843
@ -58,7 +58,10 @@ fn resolve_addrs(servers: &Vec<&str>) -> io::Result<Vec<SocketAddr>> {
|
||||
let mut results = Vec::new();
|
||||
for name in servers.iter().cloned() {
|
||||
// TODO for resolution errors return a more valid error with the domain name.
|
||||
results.extend(name.to_socket_addrs()?);
|
||||
match name.to_socket_addrs() {
|
||||
Ok(addr) => results.extend(addr),
|
||||
Err(e) => eprintln!("Failed to resolve {} with error {}", name, e),
|
||||
}
|
||||
}
|
||||
return Ok(results);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user