From 03580a19afe5ce76323a7366b92243a94d445de1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 29 Oct 2013 00:36:49 +0000 Subject: configurator: validate :reuseport for boolean-ess In case we (and Linux) supports other values in the future, we can update it then. Until now, ensure users only set true or false for this option. --- lib/unicorn/configurator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb index fc3405a..9406223 100644 --- a/lib/unicorn/configurator.rb +++ b/lib/unicorn/configurator.rb @@ -415,7 +415,7 @@ class Unicorn::Configurator Integer === value or raise ArgumentError, "not an integer: #{key}=#{value.inspect}" end - [ :tcp_nodelay, :tcp_nopush, :ipv6only ].each do |key| + [ :tcp_nodelay, :tcp_nopush, :ipv6only, :reuseport ].each do |key| (value = options[key]).nil? and next TrueClass === value || FalseClass === value or raise ArgumentError, "not boolean: #{key}=#{value.inspect}" -- cgit v1.2.3-24-ge0c7