diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-24 22:52:35 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-24 22:59:07 -0800 |
commit | 2bc6e7a3c4e972ee3227d931e79bc4057ba278ca (patch) | |
tree | aeb9b673dd2012e156f5e6f05b920b08865544dd /lib/rainbows/rev/client.rb | |
parent | cf504b527fa8ca2b612db1d7967a76536dc8347f (diff) | |
download | rainbows-2bc6e7a3c4e972ee3227d931e79bc4057ba278ca.tar.gz |
Due to the addition of keepalive_timeouts, it's safer to pay a performance penalty and use a hash here instead.
Diffstat (limited to 'lib/rainbows/rev/client.rb')
-rw-r--r-- | lib/rainbows/rev/client.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rainbows/rev/client.rb b/lib/rainbows/rev/client.rb index f7a9750..af56889 100644 --- a/lib/rainbows/rev/client.rb +++ b/lib/rainbows/rev/client.rb @@ -8,7 +8,7 @@ module Rainbows G = Rainbows::G def initialize(io) - G.cur += 1 + CONN[self] = false super(io) post_init @deferred_bodies = [] # for (fast) regular files only @@ -71,7 +71,7 @@ module Rainbows end def on_close - G.cur -= 1 + CONN.delete(self) end end # module Client |