actually put the close within the same tick as the app
This commit is contained in:
parent
81a049fc71
commit
075f3a2f3c
@ -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 }
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
module Rack
|
||||
class EMStream
|
||||
VERSION = "0.1.1"
|
||||
VERSION = "0.1.2"
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user