From 845aacc83721e888a6893ba863c6406e2528143d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 27 Mar 2017 21:10:22 +0000 Subject: rackup_handler: remove unnecessary branch 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 @@ 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 -- cgit v1.2.3-24-ge0c7