about summary refs log tree commit homepage
path: root/lib/rainbows/coolio
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-01-11 16:01:20 -0800
committerEric Wong <normalperson@yhbt.net>2011-01-11 16:28:44 -0800
commit89f948aeaef34114ec61291ff8ffbebcf85a748e (patch)
tree6c0a8d3a7b7b6f9d33ee2f3498b3d55acfda1343 /lib/rainbows/coolio
parent0515dee246536cb3942f51f8d264737f106d3985 (diff)
downloadrainbows-89f948aeaef34114ec61291ff8ffbebcf85a748e.tar.gz
We cannot trigger on_read events and invoke the HTTP parser and
modify @env while we're waiting for an application to run
async.callback.  We also need to clear (and *maybe* re-set)
@deferred if we're writing from async.callback
Diffstat (limited to 'lib/rainbows/coolio')
-rw-r--r--lib/rainbows/coolio/client.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/rainbows/coolio/client.rb b/lib/rainbows/coolio/client.rb
index 6264df7..f44d2aa 100644
--- a/lib/rainbows/coolio/client.rb
+++ b/lib/rainbows/coolio/client.rb
@@ -105,17 +105,12 @@ class Rainbows::Coolio::Client < Coolio::IO
     @state = :headers
   end
 
-  def coolio_write_async_response(response)
-    write_async_response(response)
-    @deferred = nil
-  end
-
   def app_call
     KATO.delete(self)
     disable if enabled?
     @env[RACK_INPUT] = @input
     @env[REMOTE_ADDR] = @_io.kgio_addr
-    @env[ASYNC_CALLBACK] = method(:coolio_write_async_response)
+    @env[ASYNC_CALLBACK] = method(:write_async_response)
     status, headers, body = catch(:async) {
       APP.call(@env.merge!(RACK_DEFAULTS))
     }