mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-03-04 02:14:40 +01:00
Make error more explicit
This commit is contained in:
parent
d8aec47a72
commit
c3dd761b81
1 changed files with 7 additions and 1 deletions
|
@ -462,8 +462,14 @@ func (xTransport *XTransport) resolveAndUpdateCache(host string) error {
|
|||
}
|
||||
}
|
||||
if foundIP == nil {
|
||||
if !xTransport.useIPv4 && xTransport.useIPv6 {
|
||||
dlog.Warnf("no IPv6 address found for [%s]", host)
|
||||
} else if xTransport.useIPv4 && !xTransport.useIPv6 {
|
||||
dlog.Warnf("no IPv4 address found for [%s]", host)
|
||||
} else {
|
||||
dlog.Errorf("no IP address found for [%s]", host)
|
||||
}
|
||||
}
|
||||
xTransport.saveCachedIP(host, foundIP, ttl)
|
||||
dlog.Debugf("[%s] IP address [%s] added to the cache, valid for %v", host, foundIP, ttl)
|
||||
return nil
|
||||
|
|
Loading…
Add table
Reference in a new issue