From cfd6ced1348ccb823c299f5ccf5d5bb63176b59f Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 11 Aug 2023 11:42:12 +0200 Subject: [PATCH] Make RefreshDelay match the documentation --- dnscrypt-proxy/config.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dnscrypt-proxy/config.go b/dnscrypt-proxy/config.go index b141ee42..b88c1eb1 100644 --- a/dnscrypt-proxy/config.go +++ b/dnscrypt-proxy/config.go @@ -894,9 +894,8 @@ func (config *Config) loadSource(proxy *Proxy, cfgSourceName string, cfgSource * } if cfgSource.RefreshDelay <= 0 { cfgSource.RefreshDelay = 72 - } else if cfgSource.RefreshDelay > 168 { - cfgSource.RefreshDelay = 168 } + cfgSource.RefreshDelay = Min(168, Max(24, cfgSource.RefreshDelay)) source, err := NewSource( cfgSourceName, proxy.xTransport,