From 2bc6e7a3c4e972ee3227d931e79bc4057ba278ca Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 24 Nov 2009 22:52:35 -0800 Subject: Rev*: safer client accounting Due to the addition of keepalive_timeouts, it's safer to pay a performance penalty and use a hash here instead. --- lib/rainbows/rev/core.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rainbows/rev/core.rb') diff --git a/lib/rainbows/rev/core.rb b/lib/rainbows/rev/core.rb index 0460137..472182a 100644 --- a/lib/rainbows/rev/core.rb +++ b/lib/rainbows/rev/core.rb @@ -11,7 +11,7 @@ module Rainbows # CL and MAX will be defined in the corresponding worker loop def on_readable - return if G.cur >= MAX + return if CONN.size >= MAX begin CL.new(@_io.accept_nonblock).attach(LOOP) rescue Errno::EAGAIN, Errno::ECONNABORTED -- cgit v1.2.3-24-ge0c7