From 69d8ec2f167eb99a1efec4a770ba5951e7c366f0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 10 Jan 2011 18:07:21 -0800 Subject: coolio: enable async.callback for one-shot body responses The lack of an equivlent to EM::Deferrable prevents us from doing streaming/trickling responses, but a one-shot body should work fine for Coolio and generating dynamic responses. --- lib/rainbows/coolio/thread_client.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/rainbows/coolio/thread_client.rb') diff --git a/lib/rainbows/coolio/thread_client.rb b/lib/rainbows/coolio/thread_client.rb index 6cd77b9..b837115 100644 --- a/lib/rainbows/coolio/thread_client.rb +++ b/lib/rainbows/coolio/thread_client.rb @@ -14,9 +14,7 @@ class Rainbows::Coolio::ThreadClient < Rainbows::Coolio::Client # this is only called in the master thread def response_write(response) - coolio_write_response(response, alive = @hp.next?) - return quit unless alive && :close != @state - @state = :headers + ev_write_response(*response, @hp.next?) rescue => e handle_error(e) end -- cgit v1.2.3-24-ge0c7