From c6f9b174145dbfc30209ebeeb273ee9ff43ba5be Mon Sep 17 00:00:00 2001 From: "Matthew R. Kasun" Date: Fri, 9 Sep 2022 11:00:56 -0400 Subject: [PATCH] address code review comments --- netclient/functions/connection.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/netclient/functions/connection.go b/netclient/functions/connection.go index 1a0e171d..5c1dee2d 100644 --- a/netclient/functions/connection.go +++ b/netclient/functions/connection.go @@ -24,8 +24,9 @@ func Connect(network string) error { if err = wireguard.ApplyConf(&cfg.Node, cfg.Node.Interface, filePath); err != nil { return err } + err = config.ModNodeConfig(&cfg.Node) daemon.Restart() - return config.ModNodeConfig(&cfg.Node) + return err } // Disconnect - attempts to disconnect a node on given network @@ -43,6 +44,7 @@ func Disconnect(network string) error { if err = wireguard.ApplyConf(&cfg.Node, cfg.Node.Interface, filePath); err != nil { return err } + err = config.ModNodeConfig(&cfg.Node) daemon.Restart() - return config.ModNodeConfig(&cfg.Node) + return err }