diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-01-07 16:12:26 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-01-07 16:12:26 -0800 |
commit | 7e4a7225dbd01df27a6b3ec44e53c013b889a724 (patch) | |
tree | 0feeb47a6ec71c396aae8a9da5c72c8052468ef2 /lib/rainbows/event_machine | |
parent | 9d2fdee38f990e44b3a232c27f51287173e60e91 (diff) | |
download | rainbows-7e4a7225dbd01df27a6b3ec44e53c013b889a724.tar.gz |
Since we support keepalive now, setting @state can be harmful and the comment is out-of-date.
Diffstat (limited to 'lib/rainbows/event_machine')
-rw-r--r-- | lib/rainbows/event_machine/client.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/rainbows/event_machine/client.rb b/lib/rainbows/event_machine/client.rb index 22e5360..ff77d2b 100644 --- a/lib/rainbows/event_machine/client.rb +++ b/lib/rainbows/event_machine/client.rb @@ -39,16 +39,12 @@ class Rainbows::EventMachine::Client < EM::Connection @env[REMOTE_ADDR] = @_io.kgio_addr @env[ASYNC_CALLBACK] = method(:write_async_response) @env[ASYNC_CLOSE] = EM::DefaultDeferrable.new - status, headers, body = catch(:async) { APP.call(@env.merge!(RACK_DEFAULTS)) } - # too tricky to support pipelining with :async since the - # second (pipelined) request could be a stuck behind a - # long-running async response - (status.nil? || -1 == status) and return @state = :close - write_response(status, headers, body, @hp.next?) + (nil == status || -1 == status) or + write_response(status, headers, body, @hp.next?) end def next! |