mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Merge pull request #345 from jc00ke/convert-thread-counts-to-ints
Use integers when comparing thread counts
This commit is contained in:
commit
45835511c5
1 changed files with 3 additions and 1 deletions
|
@ -266,8 +266,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…
Reference in a new issue