rack-emstream 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rack-emstream/version.rb +1 -1
- data/lib/rack-emstream.rb +2 -2
- metadata +1 -1
data/lib/rack-emstream.rb
CHANGED
@@ -19,11 +19,11 @@ module Rack
|
|
19
19
|
def _call(env)
|
20
20
|
result = @app.call(env)
|
21
21
|
|
22
|
+
result[2].close if result[2].respond_to?(:close)
|
23
|
+
|
22
24
|
EM.next_tick {
|
23
25
|
env['async.callback'].call [ result[0], result[1], self ]
|
24
26
|
|
25
|
-
result[2].close if result[2].respond_to?(:close)
|
26
|
-
|
27
27
|
result[2].each { |data| EM.next_tick { @callback.call(data) } }
|
28
28
|
EM.next_tick { succeed }
|
29
29
|
}
|