From 704f843054f3ca32941d42972a1c7d1b144d06ad Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 9 May 2011 04:39:54 +0000 Subject: configurator: move validation logic over There's actually no reason we can't have these methods in Rainbows::Configurator where it's easier to document nowadays. --- lib/rainbows/coolio/heartbeat.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/rainbows/coolio/heartbeat.rb') diff --git a/lib/rainbows/coolio/heartbeat.rb b/lib/rainbows/coolio/heartbeat.rb index 4657155..f58ed33 100644 --- a/lib/rainbows/coolio/heartbeat.rb +++ b/lib/rainbows/coolio/heartbeat.rb @@ -8,9 +8,10 @@ class Rainbows::Coolio::Heartbeat < Coolio::TimerWatcher KATO = Rainbows::Coolio::KATO CONN = Rainbows::Coolio::CONN + Rainbows.config!(self, :keepalive_timeout) def on_timer - if (ot = Rainbows.keepalive_timeout) >= 0 + if (ot = KEEPALIVE_TIMEOUT) >= 0 ot = Time.now - ot KATO.delete_if { |client, time| time < ot and client.timeout? } end -- cgit v1.2.3-24-ge0c7