From 2489368a624cff50a330238cf3c3f16eb0bd743c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 28 Nov 2009 11:26:39 -0800 Subject: common Rainbows.accept method --- lib/rainbows/rev/core.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/rainbows/rev') diff --git a/lib/rainbows/rev/core.rb b/lib/rainbows/rev/core.rb index 785990c..b78fe85 100644 --- a/lib/rainbows/rev/core.rb +++ b/lib/rainbows/rev/core.rb @@ -14,10 +14,7 @@ module Rainbows def on_readable return if CONN.size >= MAX - begin - CL.new(@_io.accept_nonblock).attach(LOOP) - rescue Errno::EAGAIN, Errno::ECONNABORTED - end + io = Rainbows.accept(@_io) and CL.new(io).attach(LOOP) end end # class Server -- cgit v1.2.3-24-ge0c7