From c579481af7fc625524a6e4779b0a79b68a0595f1 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 23 Feb 2022 19:36:01 +0100 Subject: [PATCH] :gear: Improve error handling in vpn.NetworkService --- pkg/vpn/vpn.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/vpn/vpn.go b/pkg/vpn/vpn.go index e4821330..899a1d26 100644 --- a/pkg/vpn/vpn.go +++ b/pkg/vpn/vpn.go @@ -59,7 +59,9 @@ func VPNNetworkService(p ...Option) node.NetworkService { Logger: logger.New(log.LevelDebug), MaxStreams: 30, } - c.Apply(p...) + if err := c.Apply(p...); err != nil { + return err + } ifce, err := createInterface(c) if err != nil {