mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-27 12:52:27 +02:00
cmd/cli: silent un-necessary error for physical interfaces loop
The loop is run after the main interface DNS was set, thus the error would make noise to users. This commit removes the noise, by making currentStaticDNS returns an additional error, so it's up to the caller to decive whether to emit the error or not. Further, the physical interface loop will now only log when the callback function runs successfully. Emitting the callback error can be done in the future, until we can figure out how to detect physical interfaces in Go portably.
This commit is contained in:
committed by
Cuong Manh Le
parent
fdb82f6ec3
commit
583718f234
@@ -2223,8 +2223,3 @@ func absHomeDir(filename string) string {
|
||||
}
|
||||
return filepath.Join(dir, filename)
|
||||
}
|
||||
|
||||
// ifaceUp reports whether the net interface is up.
|
||||
func ifaceUp(iface *net.Interface) bool {
|
||||
return iface != nil && iface.Flags&net.FlagUp != 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user