From 2e60b9a81c2e1941840400e942feb4fca14e72ba Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Thu, 21 Sep 2023 08:28:05 +0800 Subject: [PATCH] chore: Restore go1.20 support --- dns/util.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dns/util.go b/dns/util.go index c9d48a49..08daadbd 100644 --- a/dns/util.go +++ b/dns/util.go @@ -64,7 +64,9 @@ func putMsgToCacheWithExpire(c *cache.LruCache[string, *D.Msg], key string, msg return } - sec = max(sec, 120) // at least 2 minutes to cache + if sec > 120 { + sec = 120 // at least 2 minutes to cache + } }