diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-01-05 18:01:36 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-01-06 19:50:34 -0800 |
commit | 370fb8c7811704ed65384f599b52ac1b6d0c36c9 (patch) | |
tree | ff5024a3d1f507c6e88801f0c8f0c6e154bfe1e2 /lib/rainbows/event_machine/client.rb | |
parent | 2cb26ba8084cd37996330616b885de1c780d848e (diff) | |
download | rainbows-370fb8c7811704ed65384f599b52ac1b6d0c36c9.tar.gz |
async.callback will be useful with Coolio (and more!) soon, so ensure it works as well as the rest of Rainbows!
Diffstat (limited to 'lib/rainbows/event_machine/client.rb')
-rw-r--r-- | lib/rainbows/event_machine/client.rb | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/rainbows/event_machine/client.rb b/lib/rainbows/event_machine/client.rb index 5abdc3b..22e5360 100644 --- a/lib/rainbows/event_machine/client.rb +++ b/lib/rainbows/event_machine/client.rb @@ -48,18 +48,7 @@ class Rainbows::EventMachine::Client < EM::Connection # second (pipelined) request could be a stuck behind a # long-running async response (status.nil? || -1 == status) and return @state = :close - - if @hp.next? - @state = :headers - write_response(status, headers, body, true) - if @buf.empty? - set_comm_inactivity_timeout(Rainbows.keepalive_timeout) - elsif @body.nil? - EM.next_tick { receive_data(nil) } - end - else - write_response(status, headers, body, false) - end + write_response(status, headers, body, @hp.next?) end def next! |