cmd/cli: do not check DNS loop for upstream which is being down

This commit is contained in:
Cuong Manh Le
2024-05-22 22:43:01 +07:00
committed by Cuong Manh Le
parent 19020a96bf
commit b9f2259ae4

View File

@@ -105,6 +105,10 @@ func (p *prog) checkDnsLoop() {
for uid := range p.loop {
msg := loopTestMsg(uid)
uc := upstream[uid]
// Skipping upstream which is being marked as down.
if uc == nil {
continue
}
resolver, err := ctrld.NewResolver(uc)
if err != nil {
mainLog.Load().Warn().Err(err).Msgf("could not perform loop check for upstream: %q, endpoint: %q", uc.Name, uc.Endpoint)