about summary refs log tree commit homepage
path: root/lib/rainbows/rev/heartbeat.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-18 00:08:23 -0800
committerEric Wong <normalperson@yhbt.net>2009-11-18 00:08:23 -0800
commit9ab648f027d25b90fb2e7011fcd92091f19e7b02 (patch)
treebf5c5d354687b2fd1c621be58a3d097e529ba5f3 /lib/rainbows/rev/heartbeat.rb
parentc71773184633402e2a47ea6c3bc6be639cddc744 (diff)
downloadrainbows-9ab648f027d25b90fb2e7011fcd92091f19e7b02.tar.gz
This is a bit trickier than the rest since we have to ensure
deferred (proxied) responses aren't nuked.
Diffstat (limited to 'lib/rainbows/rev/heartbeat.rb')
-rw-r--r--lib/rainbows/rev/heartbeat.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rainbows/rev/heartbeat.rb b/lib/rainbows/rev/heartbeat.rb
index 1f07b2d..5f76ed7 100644
--- a/lib/rainbows/rev/heartbeat.rb
+++ b/lib/rainbows/rev/heartbeat.rb
@@ -10,6 +10,8 @@ module Rainbows
     class Heartbeat < ::Rev::TimerWatcher
 
       def on_timer
+        ot = Time.now - 5
+        KATO.delete_if { |client, time| time < ot and client.timeout? }
         exit if (! G.tick && G.cur <= 0)
       end