From a31e7c0c6169c2eacaf745a40fbb0a9e2e8fa3ac Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 8 Nov 2019 22:51:04 +0100 Subject: [PATCH] Avoid ridiculously low values for proxy.certRefreshDelay --- dnscrypt-proxy/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnscrypt-proxy/config.go b/dnscrypt-proxy/config.go index 9d85a638..f05f12a1 100644 --- a/dnscrypt-proxy/config.go +++ b/dnscrypt-proxy/config.go @@ -313,7 +313,7 @@ func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error { if config.ForceTCP { proxy.mainProto = "tcp" } - proxy.certRefreshDelay = time.Duration(config.CertRefreshDelay) * time.Minute + proxy.certRefreshDelay = time.Duration(Max(60, config.CertRefreshDelay)) * time.Minute proxy.certRefreshDelayAfterFailure = time.Duration(10 * time.Second) proxy.certIgnoreTimestamp = config.CertIgnoreTimestamp proxy.ephemeralKeys = config.EphemeralKeys