Unblock ACL apply filtering because of dns probes (#1711)

moved the e.dnsServer.ProbeAvailability() to run after ACL apply filtering

run the probes in parallel
This commit is contained in:
Maycon Santos
2024-03-15 18:57:18 +01:00
committed by GitHub
parent fc7c1e397f
commit 416f04c27a
2 changed files with 12 additions and 5 deletions

View File

@@ -278,9 +278,15 @@ func (s *DefaultServer) SearchDomains() []string {
// ProbeAvailability tests each upstream group's servers for availability
// and deactivates the group if no server responds
func (s *DefaultServer) ProbeAvailability() {
var wg sync.WaitGroup
for _, mux := range s.dnsMuxMap {
mux.probeAvailability()
wg.Add(1)
go func(mux handlerWithStop) {
defer wg.Done()
mux.probeAvailability()
}(mux)
}
wg.Wait()
}
func (s *DefaultServer) applyConfiguration(update nbdns.Config) error {