From 0d354a3cb78a8fe08fac8a91e945dcb50db5ca55 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 9 Sep 2009 12:46:13 -0700 Subject: http_response: don't "rescue nil" for body.close This can hide bugs in Rack applications/middleware. Most other Rack handlers/servers seem to follow this route as well, so this helps ensure broken things will break loudly and more consistently across all Rack-enabled servers :) --- lib/unicorn/http_response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unicorn/http_response.rb b/lib/unicorn/http_response.rb index e0ff805..0d05b2c 100644 --- a/lib/unicorn/http_response.rb +++ b/lib/unicorn/http_response.rb @@ -69,7 +69,7 @@ module Unicorn body.each { |chunk| socket.write(chunk) } socket.close # flushes and uncorks the socket immediately ensure - body.respond_to?(:close) and body.close rescue nil + body.respond_to?(:close) and body.close end end -- cgit v1.2.3-24-ge0c7