From ed7669ced3aba5c0ba6f5fbee9411546b32c96df Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 5 Jan 2011 16:29:53 -0800 Subject: simplify keepalive_timeout accounting Easier just to use an instance variable --- lib/rainbows/coolio/heartbeat.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rainbows/coolio/heartbeat.rb') diff --git a/lib/rainbows/coolio/heartbeat.rb b/lib/rainbows/coolio/heartbeat.rb index d1f4747..4506b84 100644 --- a/lib/rainbows/coolio/heartbeat.rb +++ b/lib/rainbows/coolio/heartbeat.rb @@ -11,7 +11,7 @@ class Rainbows::Coolio::Heartbeat < Coolio::TimerWatcher G = Rainbows::G def on_timer - if (ot = G.kato) >= 0 + if (ot = Rainbows.keepalive_timeout) >= 0 ot = Time.now - ot KATO.delete_if { |client, time| time < ot and client.timeout? } end -- cgit v1.2.3-24-ge0c7