fix(dns): skip blocking if block lists download fails

This commit is contained in:
Quentin McGaw
2026-02-16 15:27:07 +00:00
parent 23cf3231f0
commit 270dce9acb
6 changed files with 17 additions and 21 deletions
+2 -2
View File
@@ -30,8 +30,9 @@ func (l *Loop) RunRestartTicker(ctx context.Context, done chan<- struct{}) {
lastTick = l.timeNow()
status := l.GetStatus()
settings := l.GetSettings()
if status == constants.Running {
if err := l.updateFiles(ctx); err != nil {
if err := l.updateFiles(ctx, settings); err != nil {
l.statusManager.SetStatus(constants.Crashed)
l.logger.Error(err.Error())
l.logger.Warn("skipping DNS server restart due to failed files update")
@@ -44,7 +45,6 @@ func (l *Loop) RunRestartTicker(ctx context.Context, done chan<- struct{}) {
_, _ = l.statusManager.ApplyStatus(ctx, constants.Stopped)
_, _ = l.statusManager.ApplyStatus(ctx, constants.Running)
settings := l.GetSettings()
timer.Reset(*settings.UpdatePeriod)
case <-l.updateTicker:
if !timer.Stop() {