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
@@ -40,7 +40,7 @@ func (p *prog) watchResolvConf(iface *net.Interface, ns []netip.Addr, setDnsFn f
mainLog.Load().Debug().Msgf("stopping watcher for %s", resolvConfPath)
return
case event, ok := <-watcher.Events:
if p.leakingQuery.Load() {
if p.leakingQuery.Load() || p.um.isChecking(upstreamOS) {
return
}
if !ok {