aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/swarm/config.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/swarm/config.go b/cmd/swarm/config.go
index 00978ba26..9d6fe41a7 100644
--- a/cmd/swarm/config.go
+++ b/cmd/swarm/config.go
@@ -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 != "" {