mirror of
https://github.com/fafhrd91/actix-net
synced 2025-01-19 03:44:40 +01:00
Log error if dns system config could not be loaded
This commit is contained in:
parent
810fa869ae
commit
b9ea445e70
@ -1,6 +1,10 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## [0.1.2] - 2019-04-xx
|
## [0.1.2] - 2019-04-04
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
* Log error if dns system config could not be loaded.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
@ -47,10 +47,12 @@ pub fn start_resolver(cfg: ResolverConfig, opts: ResolverOpts) -> AsyncResolver
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn start_default_resolver() -> AsyncResolver {
|
pub fn start_default_resolver() -> AsyncResolver {
|
||||||
let (cfg, opts) = if let Ok((cfg, opts)) = read_system_conf() {
|
let (cfg, opts) = match read_system_conf() {
|
||||||
(cfg, opts)
|
Ok((cfg, opts)) => (cfg, opts),
|
||||||
} else {
|
Err(e) => {
|
||||||
(ResolverConfig::default(), ResolverOpts::default())
|
log::error!("TRust-DNS can not load system config: {}", e);
|
||||||
|
(ResolverConfig::default(), ResolverOpts::default())
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let (resolver, bg) = AsyncResolver::new(cfg, opts);
|
let (resolver, bg) = AsyncResolver::new(cfg, opts);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user