Browse Source

add network name from cli

0xdcarns 3 years ago
parent
commit
f926f4c379
1 changed files with 2 additions and 2 deletions
  1. 2 2
      netclient/command/commands.go

+ 2 - 2
netclient/command/commands.go

@@ -150,7 +150,7 @@ func Connect(cfg config.ClientConfig) error {
 	if networkName == "" {
 	if networkName == "" {
 		networkName = cfg.Node.Network
 		networkName = cfg.Node.Network
 	}
 	}
-	if networkName == "" {
+	if networkName == "all" {
 		return fmt.Errorf("no network specified")
 		return fmt.Errorf("no network specified")
 	}
 	}
 	return functions.Connect(networkName)
 	return functions.Connect(networkName)
@@ -162,7 +162,7 @@ func Disconnect(cfg config.ClientConfig) error {
 	if networkName == "" {
 	if networkName == "" {
 		networkName = cfg.Node.Network
 		networkName = cfg.Node.Network
 	}
 	}
-	if networkName == "" {
+	if networkName == "all" {
 		return fmt.Errorf("no network specified")
 		return fmt.Errorf("no network specified")
 	}
 	}
 	return functions.Disconnect(networkName)
 	return functions.Disconnect(networkName)