mirror of
https://github.com/daeuniverse/dae.git
synced 2024-12-22 20:54:41 +07:00
fix: dead loop if no dns upstream given
This commit is contained in:
parent
adfcef4d13
commit
4706f58d22
@ -110,9 +110,7 @@ func New(log *logrus.Logger, dns *config.Dns, opt *NewOption) (s *Dns, err error
|
|||||||
}
|
}
|
||||||
if len(dns.Upstream) == 0 {
|
if len(dns.Upstream) == 0 {
|
||||||
// Immediately ready.
|
// Immediately ready.
|
||||||
if err = opt.UpstreamReadyCallback(nil, nil); err != nil {
|
go opt.UpstreamReadyCallback(nil, nil)
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return s, nil
|
return s, nil
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,6 @@ func NewControlPlane(
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("RoutingMatcherBuilder.BuildKernspace: %w", err)
|
return nil, fmt.Errorf("RoutingMatcherBuilder.BuildKernspace: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Dial mode.
|
/// Dial mode.
|
||||||
dialMode, err := consts.ParseDialMode(global.DialMode)
|
dialMode, err := consts.ParseDialMode(global.DialMode)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -325,7 +324,6 @@ func NewControlPlane(
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Dns controller.
|
/// Dns controller.
|
||||||
if plane.dnsController, err = NewDnsController(dnsUpstream, &DnsControllerOption{
|
if plane.dnsController, err = NewDnsController(dnsUpstream, &DnsControllerOption{
|
||||||
Log: log,
|
Log: log,
|
||||||
|
Loading…
Reference in New Issue
Block a user