From 9da2f8711f5dfe9e94485dcf3373c2eabcc7b22f Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Sun, 27 Aug 2023 14:43:21 +0000 Subject: [PATCH] zones: fix PruneWireguardConfig recursion Zones and Zone implementation should call Machine's directly instead jumping back to Zone's for each Machine again and again Signed-off-by: Alejandro Mery --- pkg/zones/wireguard.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/zones/wireguard.go b/pkg/zones/wireguard.go index be0f418..35888db 100644 --- a/pkg/zones/wireguard.go +++ b/pkg/zones/wireguard.go @@ -45,7 +45,7 @@ func pruneWireguardConfig(m MachineIterator, ring int) error { var err error m.ForEachMachine(func(p *Machine) bool { - err = p.zone.PruneWireguardConfig(ring) + err = p.PruneWireguardConfig(ring) if os.IsNotExist(err) { // ignore err = nil