From 96fbc5e91017c4912169629abc7dbb56cda9082c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 30 Dec 2009 01:27:15 -0800 Subject: EventMachine: support deferrables in responses Some async apps rely on more than just "async.callback" and make full use of Deferrables provided by the EM::Deferrable module. Thanks to James Tucker for bringing this to our attention. --- lib/rainbows/ev_core.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/rainbows/ev_core.rb') diff --git a/lib/rainbows/ev_core.rb b/lib/rainbows/ev_core.rb index 0d3c079..a9c5bfc 100644 --- a/lib/rainbows/ev_core.rb +++ b/lib/rainbows/ev_core.rb @@ -11,6 +11,8 @@ module Rainbows # Apps may return this Rack response: AsyncResponse = [ -1, {}, [] ] ASYNC_CALLBACK = "async.callback".freeze + ASYNC_CLOSE = "async.close".freeze + def post_init @remote_addr = ::TCPSocket === @_io ? @_io.peeraddr.last : LOCALHOST @env = {} -- cgit v1.2.3-24-ge0c7