actually put the close within the same tick as the app

This commit is contained in:
John Bintz 2012-08-29 13:58:18 -04:00
parent 81a049fc71
commit 075f3a2f3c
2 changed files with 3 additions and 3 deletions

View File

@ -19,11 +19,11 @@ module Rack
def _call(env)
result = @app.call(env)
result[2].close if result[2].respond_to?(:close)
EM.next_tick {
env['async.callback'].call [ result[0], result[1], self ]
result[2].close if result[2].respond_to?(:close)
result[2].each { |data| EM.next_tick { @callback.call(data) } }
EM.next_tick { succeed }
}

View File

@ -1,5 +1,5 @@
module Rack
class EMStream
VERSION = "0.1.1"
VERSION = "0.1.2"
end
end