about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-03-27 21:10:22 +0000
committerEric Wong <e@80x24.org>2017-04-05 01:22:53 +0000
commit845aacc83721e888a6893ba863c6406e2528143d (patch)
tree367e702c0dc0ccf7e8f54c36e900b315e3c5e767
parent736776c02a2049dc62d47520602cbd9dcff0fa26 (diff)
downloadyahns-845aacc83721e888a6893ba863c6406e2528143d.tar.gz
No point in optimizing for the single listener case in
setup code.
-rw-r--r--lib/yahns/rackup_handler.rb6
1 files changed, 1 insertions, 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 @@ module Yahns::RackupHandler # :nodoc:
       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