diff --git a/lib/puma/dsl.rb b/lib/puma/dsl.rb index 7235fd1b..e47d8e40 100644 --- a/lib/puma/dsl.rb +++ b/lib/puma/dsl.rb @@ -136,6 +136,10 @@ module Puma raise "The minimum (#{min}) number of threads must be less than or equal to the max (#{max})" end + if max < 1 + raise "The maximum number of threads (#{max}) must be greater than 0" + end + @options[:min_threads] = min @options[:max_threads] = max end