updated join logic

if join fails, don't try to leave as authentication will fail --- just
    wipe
This commit is contained in:
Matthew R. Kasun
2022-06-20 10:37:31 -04:00
parent 2720c64ac7
commit 4bc04d5922
6 changed files with 10 additions and 21 deletions

View File

@@ -127,7 +127,7 @@ func Uninstall() error {
logger.Log(1, "continuing uninstall without leaving networks")
} else {
for _, network := range networks {
err = LeaveNetwork(network, true)
err = LeaveNetwork(network)
if err != nil {
logger.Log(1, "Encounter issue leaving network ", network, ": ", err.Error())
}
@@ -151,7 +151,7 @@ func Uninstall() error {
}
// LeaveNetwork - client exits a network
func LeaveNetwork(network string, force bool) error {
func LeaveNetwork(network string) error {
cfg, err := config.ReadConfig(network)
if err != nil {
return err