From b1f328b0dd3647168fcc8b1ad9b09284707ad929 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 11 Aug 2011 17:28:47 -0700 Subject: http_server: small simplification for redirects We only need the fileno in the key which we use to generate the UNICORN_FD env. Otherwise the IO object is accepted and understood by Ruby. --- lib/unicorn/http_server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index 3d23d12..aa8212e 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -413,7 +413,7 @@ class Unicorn::HttpServer # Ruby that sets FD_CLOEXEC by default on new file descriptors # ref: http://redmine.ruby-lang.org/issues/5041 sock.close_on_exec = false if sock.respond_to?(:close_on_exec=) - [ sock.fileno, sock.fileno ] + [ sock.fileno, sock ] end] ENV['UNICORN_FD'] = listener_fds.keys.join(',') Dir.chdir(START_CTX[:cwd]) -- cgit v1.2.3-24-ge0c7