diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-12-27 20:25:39 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-12-28 17:12:28 -0800 |
commit | 3495d59763e6159975debf32728dc53fc41c5ea1 (patch) | |
tree | 949415250af66075cc9ca98040a85ddc2ad84380 /lib/rainbows/event_machine/response_pipe.rb | |
parent | 53afe0b23fc67c5b25541cddbd68f905c649e756 (diff) | |
download | rainbows-3495d59763e6159975debf32728dc53fc41c5ea1.tar.gz |
Some middlewares require the Rack env to be preserved all the way through to close, so we'll ensure all request models preserve it. We also need to better response body wrappers/proxies always get fired properly when returning. IO.copy_stream and "sendfile" gem users could hit cases where wrappers did not fire properly.
Diffstat (limited to 'lib/rainbows/event_machine/response_pipe.rb')
-rw-r--r-- | lib/rainbows/event_machine/response_pipe.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rainbows/event_machine/response_pipe.rb b/lib/rainbows/event_machine/response_pipe.rb index 2417dbe..3da2417 100644 --- a/lib/rainbows/event_machine/response_pipe.rb +++ b/lib/rainbows/event_machine/response_pipe.rb @@ -22,9 +22,8 @@ module Rainbows::EventMachine::ResponsePipe end def unbind - @client.body = nil - @alive ? @client.on_read('') : @client.quit @body.close if @body.respond_to?(:close) + @client.next! @io.close unless @io.closed? end end |