Extend the grace period and log when it's used

This commit is contained in:
Frank Denis 2019-12-09 17:08:59 +01:00
parent 21a5765527
commit 56d02597a6
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,7 @@ const (
DefaultTimeout = 30 * time.Second
SystemResolverIPTTL = 24 * time.Hour
MinResolverIPTTL = 12 * time.Hour
ExpiredCachedIPGraceTTL = 5 * time.Minute
ExpiredCachedIPGraceTTL = 15 * time.Minute
)
type CachedIPItem struct {
@ -289,6 +289,7 @@ func (xTransport *XTransport) resolveAndUpdateCache(host string) error {
}
if err != nil {
if cachedIP != nil {
dlog.Noticef("Using stale [%v] cached address for a grace period", host)
foundIP = cachedIP
ttl = ExpiredCachedIPGraceTTL
} else {