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 <amery@jpi.io>
This commit is contained in:
2023-08-27 14:43:21 +00:00
parent 2a14205e7e
commit 9da2f8711f
+1 -1
View File
@@ -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