No point in optimizing for the single listener case in
setup code.
---
 lib/yahns/rackup_handler.rb | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/yahns/rackup_handler.rb b/lib/yahns/rackup_handler.rb
index 538e00d..63ab373 100644
--- a/lib/yahns/rackup_handler.rb
+++ b/lib/yahns/rackup_handler.rb
@@ -19,11 +19,7 @@ def self.run(app, o)
       app(:rack, app) do
         addr = o[:listen] || "#{o[:Host]||default_host}:#{o[:Port]||8080}"
         # allow listening to multiple addresses
-        if addr.include?(',')
-          addr.split(',').each { |l| listen(l) }
-        else
-          listen addr
-        end
+        addr.split(',').each { |l| listen(l) }
 
         val = o[:client_timeout] and client_timeout(val)
       end
-- 
EW

--
unsubscribe: yahns-public+unsubscr...@yhbt.net
archive: https://yhbt.net/yahns-public/

Reply via email to