From 11172f9bdcc7c57c9ae857a8088e49527a953fa1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 3 Mar 2009 11:35:05 -0800 Subject: Raise ArgumentError if listeners are empty Instead of blindly trying to bind to the default listener (which is already the default as specified by Configurator). --- lib/unicorn.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 7415c12..72dc56b 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -87,7 +87,7 @@ module Unicorn # objects; we need to prevent Socket objects from being garbage-collected config_listeners -= listener_names config_listeners.each { |addr| listen(addr) } - listen(Const::DEFAULT_LISTEN) if @listeners.empty? + raise ArgumentError, "no listeners" if @listeners.empty? self.pid = @config[:pid] build_app! if @preload_app $stderr.reopen(@stderr_path, "a") if @stderr_path -- cgit v1.2.3-24-ge0c7