From 0e9cddf2e878edbe1bd1f68e2ff0673ae4d008ed Mon Sep 17 00:00:00 2001 From: Diego Romar Date: Thu, 18 Dec 2025 13:58:31 -0300 Subject: [PATCH] Execute PopulateNetbirdConfig in a go routine --- client/internal/engine.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/client/internal/engine.go b/client/internal/engine.go index 312f0ed26..5e215faa6 100644 --- a/client/internal/engine.go +++ b/client/internal/engine.go @@ -463,9 +463,15 @@ func (e *Engine) Start(netbirdConfig *mgmProto.NetbirdConfig, mgmtURL *url.URL) log.Info("created dns server") // Populate DNS cache with NetbirdConfig and management URL for early resolution - if err := e.PopulateNetbirdConfig(netbirdConfig, mgmtURL); err != nil { - log.Warnf("failed to populate DNS cache: %v", err) - } + go func() { + 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{ Context: e.ctx,