mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Use integers when comparing thread counts
When setting min & max via ENV var (PUMA_THREAD_COUNT="6:12") one will get a RuntimeError, because "6" > "12".
This commit is contained in:
parent
2ef57daf8b
commit
6222d80803
1 changed files with 3 additions and 1 deletions
|
@ -258,8 +258,10 @@ module Puma
|
|||
# requests and +max+ the maximum.
|
||||
#
|
||||
def threads(min, max)
|
||||
min = Integer(min)
|
||||
max = Integer(max)
|
||||
if min > max
|
||||
raise "The minimum number of threads must be less than the max"
|
||||
raise "The minimum (#{min}) number of threads must be less than the max (#{max})"
|
||||
end
|
||||
|
||||
@options[:min_threads] = min
|
||||
|
|
Loading…
Add table
Reference in a new issue