feat(dns): update block files after DNS server is up for a faster bootup

This commit is contained in:
Quentin McGaw
2026-02-26 18:40:19 +00:00
parent 885e491bb7
commit 0d0c0fb143
2 changed files with 5 additions and 5 deletions
+5
View File
@@ -44,6 +44,11 @@ func (l *Loop) Run(ctx context.Context, done chan<- struct{}) {
if err == nil {
l.backoffTime = defaultBackoffTime
l.logger.Info("ready and using DNS server at address " + settings.ServerAddress.String())
err = l.updateFiles(ctx, settings)
if err != nil {
l.logger.Warn("downloading block lists failed, skipping: " + err.Error())
}
break
}
-5
View File
@@ -20,11 +20,6 @@ func (l *Loop) setupServer(ctx context.Context) (runError <-chan error, err erro
return nil, fmt.Errorf("updating filter for rebinding protection: %w", err)
}
err = l.updateFiles(ctx, settings)
if err != nil {
l.logger.Warn("downloading block lists failed, skipping: " + err.Error())
}
serverSettings, err := buildServerSettings(settings, l.filter, l.localResolvers, l.logger)
if err != nil {
return nil, fmt.Errorf("building server settings: %w", err)