From a32d80a93101b884c44991247b8278002368d483 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 6 Nov 2013 17:59:25 +0000 Subject: http_response: reorder wbuf_maybe on successful early flush We can use the wbuf_close return value instead to ensure we close tmpio properly and follow the same code path as a normal (:wait_writable-triggering) buffered response would. Add a few tests to ensure we properly close the response body for exec_cgi, where I noticed zombies and started me down this rabbit hole looking for places where the response body was not closed properly. --- test/server_helper.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/server_helper.rb') diff --git a/test/server_helper.rb b/test/server_helper.rb index 2f9266a..d4b8f98 100644 --- a/test/server_helper.rb +++ b/test/server_helper.rb @@ -16,6 +16,7 @@ module ServerHelper end def poke_until_dead(pid) + assert_operator pid, :>, 0 Timeout.timeout(10) do begin Process.kill(0, pid) -- cgit v1.2.3-24-ge0c7