about summary refs log tree commit homepage
path: root/lib/rainbows/rev/client.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/rev/client.rb')
-rw-r--r--lib/rainbows/rev/client.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rainbows/rev/client.rb b/lib/rainbows/rev/client.rb
index 5c61109..4d1aaec 100644
--- a/lib/rainbows/rev/client.rb
+++ b/lib/rainbows/rev/client.rb
@@ -62,10 +62,10 @@ module Rainbows
 
       # used for streaming sockets and pipes
       def stream_response(status, headers, io, body)
-        do_chunk = stream_response_headers(status, headers) if headers
+        c = stream_response_headers(status, headers) if headers
         # we only want to attach to the Rev::Loop belonging to the
         # main thread in Ruby 1.9
-        io = DeferredResponse.new(io, self, do_chunk, body)
+        io = (c ? DeferredChunkResponse : DeferredResponse).new(io, self, body)
         defer_body(io.attach(Server::LOOP))
       end