From 6bde32081338ce8075854f4c47ce8ca5347df919 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 5 Jan 2011 17:06:20 -0800 Subject: eliminate G constant and just use the Rainbows! module Code organization is hard :< --- lib/rainbows/coolio/heartbeat.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/rainbows/coolio/heartbeat.rb') diff --git a/lib/rainbows/coolio/heartbeat.rb b/lib/rainbows/coolio/heartbeat.rb index 4506b84..4657155 100644 --- a/lib/rainbows/coolio/heartbeat.rb +++ b/lib/rainbows/coolio/heartbeat.rb @@ -8,13 +8,12 @@ class Rainbows::Coolio::Heartbeat < Coolio::TimerWatcher KATO = Rainbows::Coolio::KATO CONN = Rainbows::Coolio::CONN - G = Rainbows::G def on_timer if (ot = Rainbows.keepalive_timeout) >= 0 ot = Time.now - ot KATO.delete_if { |client, time| time < ot and client.timeout? } end - exit if (! G.tick && CONN.size <= 0) + exit if (! Rainbows.tick && CONN.size <= 0) end end -- cgit v1.2.3-24-ge0c7