From d2d8c0115cb464b93ffee04f4768ebc35d49d4ec Mon Sep 17 00:00:00 2001 From: Ahmad Nazari Date: Thu, 11 Jan 2024 06:10:04 +0330 Subject: [PATCH] fix: flush dns cache in android and cmfa build. (#971) --- dns/patch_android.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns/patch_android.go b/dns/patch_android.go index 2e9a6b9f6..e62aabcdf 100644 --- a/dns/patch_android.go +++ b/dns/patch_android.go @@ -49,7 +49,7 @@ func ServeDNSWithDefaultServer(msg *D.Msg) (*D.Msg, error) { func FlushCacheWithDefaultResolver() { if r := resolver.DefaultResolver; r != nil { - r.(*Resolver).lruCache = lru.New[string, *D.Msg](lru.WithSize[string, *D.Msg](4096), lru.WithStale[string, *D.Msg](true)) + r.(*Resolver).cache = lru.New(lru.WithSize[string, *D.Msg](4096), lru.WithStale[string, *D.Msg](true)) } }