close client socket after closing response body
commitb7a0074284d33352bb9e732c660b29162f34bf0e
authorEric Wong <normalperson@yhbt.net>
Thu, 6 Jan 2011 07:05:05 +0000 (5 23:05 -0800)
committerEric Wong <normalperson@yhbt.net>
Thu, 6 Jan 2011 07:05:05 +0000 (5 23:05 -0800)
tree664d6b3f1f732b597c41f1b48a5f478ce197de71
parent7f3ebe9213e09932cd0e8a2a82bfe2dd5430a824
close client socket after closing response body

Response bodies may capture the block passed to each
and save it for body.close, so don't close the socket
before we have a chance to call body.close

(cherry picked from commit b72a86f66c722d56a6d77ed1d2779ace6ad103ed)

Conflicts:

lib/unicorn/http_server.rb
test/unit/test_response.rb
lib/unicorn.rb
lib/unicorn/http_response.rb
t/t0018-write-on-close.sh [new file with mode: 0755]
t/write-on-close.ru [new file with mode: 0644]
test/unit/test_response.rb