fix: flush dns cache in android and cmfa build. (#971)

This commit is contained in:
Ahmad Nazari authored and GitHub committed 2024-01-11 10:40:04 +08:00
1 parent 5ec686df08
commit d2d8c0115c
1 file changed
+1 -1
+1 -1
View File
@@ -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))
}
}