mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-31 07:09:48 +07:00
fix: potential panic and check upstreams format before using them
This commit is contained in:
@ -381,6 +381,9 @@ func NewControlPlane(
|
||||
|
||||
// Init immediately to avoid DNS leaking in the very beginning because param control_plane_dns_routing will
|
||||
// be set in callback.
|
||||
if err = dnsUpstream.CheckUpstreamsFormat(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
go dnsUpstream.InitUpstreams()
|
||||
|
||||
close(plane.ready)
|
||||
|
Reference in New Issue
Block a user