diff --git a/lib/puma/binder.rb b/lib/puma/binder.rb index 548fa9d7..af31b1f6 100644 --- a/lib/puma/binder.rb +++ b/lib/puma/binder.rb @@ -163,6 +163,7 @@ module Puma # allow to accumulate before returning connection refused. # def add_tcp_listener(host, port, optimize_for_latency=true, backlog=1024) + host = host[1..-2] if host[0..0] == '[' s = TCPServer.new(host, port) if optimize_for_latency s.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)