Maint: rework DNS run loop

- Fix fragile user triggered logic
- Simplify state
- Lock loop when crashed
This commit is contained in:
Quentin McGaw (desktop)
2021-07-16 19:00:56 +00:00
parent 0ed738cd61
commit ac3ff095a1
5 changed files with 190 additions and 133 deletions

View File

@@ -65,7 +65,7 @@ func (h *dnsHandler) setStatus(w http.ResponseWriter, r *http.Request) {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
outcome, err := h.looper.SetStatus(h.ctx, status)
outcome, err := h.looper.ApplyStatus(h.ctx, status)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return