From ed28feabd79697cb27722036622aeca1fbf0723d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 30 Dec 2010 08:32:27 +0000 Subject: event_machine: cleanup response_pipe No need to pass unnecessary variables to response_pipe, just let the client handle it all. --- lib/rainbows/event_machine/response_pipe.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/rainbows/event_machine/response_pipe.rb') diff --git a/lib/rainbows/event_machine/response_pipe.rb b/lib/rainbows/event_machine/response_pipe.rb index 3da2417..3b584c7 100644 --- a/lib/rainbows/event_machine/response_pipe.rb +++ b/lib/rainbows/event_machine/response_pipe.rb @@ -5,8 +5,8 @@ module Rainbows::EventMachine::ResponsePipe # so a single buffer for all clients will work safely BUF = '' - def initialize(client, alive, body) - @client, @alive, @body = client, alive, body + def initialize(client) + @client = client end def notify_readable @@ -22,7 +22,6 @@ module Rainbows::EventMachine::ResponsePipe end def unbind - @body.close if @body.respond_to?(:close) @client.next! @io.close unless @io.closed? end -- cgit v1.2.3-24-ge0c7