mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-07 08:44:07 +01:00
Use different initialize order for DNS resolver in android/nonandroid clients (#952)
This commit is contained in:
parent
ff267768f0
commit
042f124702
@ -199,7 +199,7 @@ func (e *Engine) Start() error {
|
||||
}
|
||||
}
|
||||
|
||||
if e.dnsServer == nil {
|
||||
if e.dnsServer == nil && runtime.GOOS == "android" {
|
||||
// todo fix custom address
|
||||
dnsServer, err := dns.NewDefaultServer(e.ctx, e.wgInterface, e.config.CustomDNSAddress, dnsCfg)
|
||||
if err != nil {
|
||||
@ -259,6 +259,16 @@ func (e *Engine) Start() error {
|
||||
e.acl = acl
|
||||
}
|
||||
|
||||
if e.dnsServer == nil && runtime.GOOS != "android" {
|
||||
// todo fix custom address
|
||||
dnsServer, err := dns.NewDefaultServer(e.ctx, e.wgInterface, e.config.CustomDNSAddress, dnsCfg)
|
||||
if err != nil {
|
||||
e.close()
|
||||
return err
|
||||
}
|
||||
e.dnsServer = dnsServer
|
||||
}
|
||||
|
||||
e.receiveSignalEvents()
|
||||
e.receiveManagementEvents()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user