Bugs and lint warning fixex

Fix domain map cuncurrent access
Fix ResolverInfo Domain was not copied bug
Fix linter warnings
This commit is contained in:
Vladimir Stoilov
2022-07-21 13:35:25 +02:00
parent efd33c223f
commit 8ca384a13d
6 changed files with 25 additions and 32 deletions

View File

@@ -220,6 +220,13 @@ addNextResolver:
}
}
// the domains from the configured resolvers should not be resolved with the same resolvers
if resolver.Info.Source == ServerSourceConfigured && resolver.Info.IP == nil {
if _, ok := resolverInitDomains[q.FQDN]; ok {
continue addNextResolver
}
}
// add compliant and unique resolvers to selected resolvers
selected = append(selected, resolver)
}