fix default value for size = 0

pull/1089/merge
Darien Raymond 2018-05-09 08:10:30 +02:00
parent 70b2b22047
commit 0301222e22
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 3 additions and 1 deletions

View File

@ -57,7 +57,9 @@ func init() {
Name: raySizeEnvKey,
AltName: platform.NormalizeEnvName(raySizeEnvKey),
}.GetValueAsInt(10)
if size > 0 {
if size == 0 {
defaultLimit = 2147483647
} else {
defaultLimit = int32(size) * 1024 * 1024
}
}