Skip to content
Snippets Groups Projects
Commit 61d19b79 authored by Jake Taylor's avatar Jake Taylor :lips:
Browse files

fix gateway input

parent 09e94f5e
No related branches found
No related tags found
No related merge requests found
......@@ -133,18 +133,13 @@ func sessionInitialization() *id.User {
client.SetRateLimiting(rateLimiting)
// Handle parsing gateway addresses from the config file
gateways := viper.GetStringSlice("gateways")
if len(gwAddresses) < 1 {
gateways := ndfJSON.Gateways
// If gwAddr was not passed via command line, check config file
if len(gateways) < 1 {
// No gateways in config file or passed via command line
globals.Log.ERROR.Printf("Error: No gateway specified! Add to" +
" configuration file or pass via command line using -g!\n")
return id.ZeroID
} else {
// List of gateways found in config file
gwAddresses = gateways
}
}
// Connect to gateways and reg server
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment