From 0ec5156e59adb730817c665f7e4d512a55bfc0f0 Mon Sep 17 00:00:00 2001 From: Tim Beatham Date: Fri, 5 Jan 2024 00:14:25 +0000 Subject: [PATCH] 81-procs - fixed issue where route not deleting if mesh only one --- pkg/mesh/route.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/mesh/route.go b/pkg/mesh/route.go index 180decc..f6eab4b 100644 --- a/pkg/mesh/route.go +++ b/pkg/mesh/route.go @@ -21,6 +21,11 @@ func (r *RouteManagerImpl) UpdateRoutes() error { meshes := r.meshManager.GetMeshes() routes := make(map[string][]Route) + for _, mesh := range meshes { + // Make empty routes so that routes are retracted + routes[mesh.GetMeshId()] = make([]Route, 0) + } + for _, mesh1 := range meshes { if !*mesh1.GetConfiguration().AdvertiseRoutes { continue