1
0
Fork 0
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:
Evan Phoenix 2013-08-08 15:52:41 -07:00
commit 45835511c5

View file

@ -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