From 56d02597a698913262dfa7a8d2c75d04f9845784 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 9 Dec 2019 17:08:59 +0100 Subject: [PATCH] Extend the grace period and log when it's used --- dnscrypt-proxy/xtransport.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dnscrypt-proxy/xtransport.go b/dnscrypt-proxy/xtransport.go index bcfb3b73..8ceacabd 100644 --- a/dnscrypt-proxy/xtransport.go +++ b/dnscrypt-proxy/xtransport.go @@ -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 {