mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-09 06:59:08 +02:00
Execute PopulateNetbirdConfig in a go routine
This commit is contained in:
@@ -463,9 +463,15 @@ func (e *Engine) Start(netbirdConfig *mgmProto.NetbirdConfig, mgmtURL *url.URL)
|
|||||||
log.Info("created dns server")
|
log.Info("created dns server")
|
||||||
|
|
||||||
// Populate DNS cache with NetbirdConfig and management URL for early resolution
|
// Populate DNS cache with NetbirdConfig and management URL for early resolution
|
||||||
if err := e.PopulateNetbirdConfig(netbirdConfig, mgmtURL); err != nil {
|
go func() {
|
||||||
log.Warnf("failed to populate DNS cache: %v", err)
|
if err := e.PopulateNetbirdConfig(netbirdConfig, mgmtURL); err != nil {
|
||||||
}
|
log.Warnf("failed to populate DNS cache: %v", err)
|
||||||
|
} else {
|
||||||
|
log.Info("populated DNS cache successfully")
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
log.Info("populated DNS cache with NetbirdConfig and management URL")
|
||||||
|
|
||||||
e.routeManager = routemanager.NewManager(routemanager.ManagerConfig{
|
e.routeManager = routemanager.NewManager(routemanager.ManagerConfig{
|
||||||
Context: e.ctx,
|
Context: e.ctx,
|
||||||
|
|||||||
Reference in New Issue
Block a user