cmd/cli: ensure set/reset DNS is done before checking OS resolver

Otherwise, new DNS settings could be reverted by dns watchers, causing
the checking will be always false.
This commit is contained in:
Cuong Manh Le
2025-01-13 20:03:56 +07:00
committed by Cuong Manh Le
parent 5db7d3577b
commit a95d50c0af
4 changed files with 21 additions and 8 deletions
+1 -1
View File
@@ -552,7 +552,7 @@ func (p *prog) proxy(ctx context.Context, req *proxyRequest) *proxyResponse {
continue
}
if p.um.isDown(upstreams[n]) {
ctrld.Log(ctx, mainLog.Load().Warn(), "%s is down", upstreams[n])
ctrld.Log(ctx, mainLog.Load().Debug(), "%s is down", upstreams[n])
continue
}
answer := resolve(n, upstreamConfig, req.msg)