mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
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:
committed by
Cuong Manh Le
parent
5db7d3577b
commit
a95d50c0af
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user