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 max := os.Getenv(SWARM_ENV_MAX_STREAM_PEER_SERVERS); max != "" {
|
||||||
if m, err := strconv.Atoi(max); err == nil {
|
m, err := strconv.Atoi(max)
|
||||||
currentConfig.MaxStreamPeerServers = m
|
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 != "" {
|
if lne := os.Getenv(SWARM_ENV_LIGHT_NODE_ENABLE); lne != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user