From 664e54b71062b9702508b6e5b5dfc2b51803dee4 Mon Sep 17 00:00:00 2001 From: Tim Beatham Date: Thu, 18 Jan 2024 10:36:55 +0000 Subject: [PATCH] main - Finished for demo --- pkg/sync/syncer.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/sync/syncer.go b/pkg/sync/syncer.go index 8c5259f..d5a4424 100644 --- a/pkg/sync/syncer.go +++ b/pkg/sync/syncer.go @@ -235,6 +235,11 @@ func (s *SyncerImpl) SyncMeshes() error { var err error + err = s.meshManager.GetRouteManager().UpdateRoutes() + if err != nil { + logging.Log.WriteErrorf("update routes failed %s", err.Error()) + } + if hasChanges { logging.Log.WriteInfof("updating the WireGuard configuration") err = s.meshManager.ApplyConfig() @@ -244,11 +249,6 @@ func (s *SyncerImpl) SyncMeshes() error { } } - err = s.meshManager.GetRouteManager().UpdateRoutes() - if err != nil { - logging.Log.WriteErrorf("update routes failed %s", err.Error()) - } - return nil }