From 0d6564448ac3f6cc65ff65318597728ffd07e807 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 12 Apr 2023 19:58:39 +0200 Subject: [PATCH] Make faulture to add address fatal --- cmd/app/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/app/main.go b/cmd/app/main.go index 8e28445..2950788 100644 --- a/cmd/app/main.go +++ b/cmd/app/main.go @@ -91,7 +91,7 @@ func main() { case os.IsExist(err): logger.Warn.Println("Address is already set on interface") default: - logger.Warn.Printf("Failed to set address on interface: %v", err) + logger.Error.Fatalf("Failed to set address on interface: %v", err) } } processedCount++ @@ -100,7 +100,7 @@ func main() { logger.Warn.Printf("Not all Interface-Addresses were processed. Summary: %d processed, %d filtered, %d failed", processedCount, filteredCount, len(addrs)-processedCount-filteredCount) } - + // Get the WireGuard peers on the interface wgDevice, err := client.Device(iface) if err != nil {