cmd/swarm: fail on SWARM_ENV_MAX_STREAM_PEER_SERVERS parsing error
This commit is contained in:
parent
a5e6bf7eef
commit
86f68cf04f
@ -313,9 +313,11 @@ func envVarsOverride(currentConfig *bzzapi.Config) (config *bzzapi.Config) {
|
||||
}
|
||||
|
||||
if max := os.Getenv(SWARM_ENV_MAX_STREAM_PEER_SERVERS); max != "" {
|
||||
if m, err := strconv.Atoi(max); err == nil {
|
||||
currentConfig.MaxStreamPeerServers = m
|
||||
m, err := strconv.Atoi(max)
|
||||
if err != nil {
|
||||
utils.Fatalf("invalid environment variable %s: %v", SWARM_ENV_MAX_STREAM_PEER_SERVERS, err)
|
||||
}
|
||||
currentConfig.MaxStreamPeerServers = m
|
||||
}
|
||||
|
||||
if lne := os.Getenv(SWARM_ENV_LIGHT_NODE_ENABLE); lne != "" {
|
||||
|
Loading…
Reference in New Issue
Block a user