Maint: dns package state rework

- Interface composition with loopstate interfaces
- Use loopstate.Manager
- Create dns/state package for handling settings
This commit is contained in:
Quentin McGaw (laptop)
2021-07-24 18:34:55 +00:00
parent 3f1fb52fcb
commit 7479974d79
7 changed files with 130 additions and 216 deletions

View File

@@ -90,7 +90,7 @@ func (l *Loop) Run(ctx context.Context, done chan<- struct{}) {
closeStreams()
unboundCancel()
l.state.SetStatus(constants.Crashed)
l.statusManager.SetStatus(constants.Crashed)
const fallback = true
l.useUnencryptedDNS(fallback)
l.logAndWait(ctx, err)