fix: init upstreams should be in goroutine

This commit is contained in:
mzz2017 2023-02-27 16:24:16 +08:00
parent 95a8c0ac42
commit a1fb979ee5

View File

@ -346,7 +346,7 @@ func NewControlPlane(
}
// Init immediately to avoid DNS leaking in the very beginning because param control_plane_dns_routing will
// be set in callback.
dnsUpstream.InitUpstreams()
go dnsUpstream.InitUpstreams()
close(c.ready)
return c, nil