about summary refs log tree commit homepage
path: root/lib/rainbows/ev_core.rb
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/ev_core.rb
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/ev_core.rb')
-rw-r--r--lib/rainbows/ev_core.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rainbows/ev_core.rb b/lib/rainbows/ev_core.rb
index 0bdaab3..a3bf50f 100644
--- a/lib/rainbows/ev_core.rb
+++ b/lib/rainbows/ev_core.rb
@@ -22,6 +22,7 @@ module Rainbows::EvCore
       alive = headers.include?(Content_Length) ||
               !!(%r{\Achunked\z}i =~ headers[Transfer_Encoding])
     end
+    @deferred = nil
     ev_write_response(status, headers, body, alive)
   end