mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-27 12:52:27 +02:00
all: always reset DNS before initializing OS resolver
So ctrld could always get the correct nameservers used by system to be used for its OS resolver.
This commit is contained in:
committed by
Cuong Manh Le
parent
411f7434f4
commit
5aca118dbb
+3
-1
@@ -206,8 +206,10 @@ func (p *prog) preRun() {
|
||||
}
|
||||
|
||||
func (p *prog) postRun() {
|
||||
mainLog.Load().Debug().Msgf("initialized OS resolver with nameservers: %v", ctrld.OsNameservers)
|
||||
if !service.Interactive() {
|
||||
p.resetDNS()
|
||||
ns := ctrld.InitializeOsResolver()
|
||||
mainLog.Load().Debug().Msgf("initialized OS resolver with nameservers: %v", ns)
|
||||
p.setDNS()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user