aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJanos Guljas <janos@resenje.org>2018-09-27 16:08:57 +0800
committerJanos Guljas <janos@resenje.org>2018-09-27 16:08:57 +0800
commit86f68cf04f5166848fd44150363866d7faa72b60 (patch)
treea8ff65462707ec59c340a93b0a456657b2ab46d6 /cmd
parenta5e6bf7eefbe6f56cf688b3542fe373c4670cb65 (diff)
downloadgo-tangerine-86f68cf04f5166848fd44150363866d7faa72b60.tar
go-tangerine-86f68cf04f5166848fd44150363866d7faa72b60.tar.gz
go-tangerine-86f68cf04f5166848fd44150363866d7faa72b60.tar.bz2
go-tangerine-86f68cf04f5166848fd44150363866d7faa72b60.tar.lz
go-tangerine-86f68cf04f5166848fd44150363866d7faa72b60.tar.xz
go-tangerine-86f68cf04f5166848fd44150363866d7faa72b60.tar.zst
go-tangerine-86f68cf04f5166848fd44150363866d7faa72b60.zip
cmd/swarm: fail on SWARM_ENV_MAX_STREAM_PEER_SERVERS parsing error
Diffstat (limited to 'cmd')
-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 != "" {