diff options
-rw-r--r-- | lib/rainbows/event_machine.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/rainbows/event_machine.rb b/lib/rainbows/event_machine.rb index 9cfe481..3da6565 100644 --- a/lib/rainbows/event_machine.rb +++ b/lib/rainbows/event_machine.rb @@ -112,11 +112,8 @@ module Rainbows body.callback { quit } body.errback { quit } # async response, this could be a trickle as is in comet-style apps - if headers - headers[CONNECTION] = CLOSE - write(response_header(status, headers)) - end - return write_body_each(self, body) + headers[CONNECTION] = CLOSE if headers + alive = true elsif body.respond_to?(:to_path) io = body_to_io(body) st = io.stat |