diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-01-21 13:21:07 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-01-21 16:54:02 -0800 |
commit | 247ce76b4aabfa42157b9cbf9ebae824819cfff6 (patch) | |
tree | b3c61036f7befb1d9cb697193dc8a629ac362fe7 /lib/rainbows/epoll/response_pipe.rb | |
parent | b33ab73a984660ab2d741b32725ab21d7860bef3 (diff) | |
download | rainbows-247ce76b4aabfa42157b9cbf9ebae824819cfff6.tar.gz |
We can eliminate the State module to simplify our code since 1.3.x keeps better track of things.
Diffstat (limited to 'lib/rainbows/epoll/response_pipe.rb')
-rw-r--r-- | lib/rainbows/epoll/response_pipe.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/rainbows/epoll/response_pipe.rb b/lib/rainbows/epoll/response_pipe.rb index ce240f5..08731b1 100644 --- a/lib/rainbows/epoll/response_pipe.rb +++ b/lib/rainbows/epoll/response_pipe.rb @@ -2,15 +2,13 @@ # :enddoc: # class Rainbows::Epoll::ResponsePipe - include Rainbows::Epoll::State attr_reader :io alias to_io io - IN = SleepyPenguin::Epoll::IN | SleepyPenguin::Epoll::ET RBUF = Rainbows::EvCore::RBUF + EP = Rainbows::Epoll::EP def initialize(io, client, body) @io, @client, @body = io, client, body - @epoll_active = false end def epoll_run @@ -22,7 +20,8 @@ class Rainbows::Epoll::ResponsePipe end def close - epoll_disable + @io or return + EP.delete self @body.respond_to?(:close) and @body.close @io = @body = nil end |