about summary refs log tree commit homepage
path: root/lib/rainbows/coolio
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-05-20 09:19:51 +0000
committerEric Wong <normalperson@yhbt.net>2011-05-20 09:21:18 +0000
commitea6d0eab436c78113f8a61e7fcc34db4117d14c0 (patch)
treed70b0bd67e444997f4122c246ce438dc449242ce /lib/rainbows/coolio
parent90af18f6884857704d72fd6b2bb91718aad72117 (diff)
downloadrainbows-ea6d0eab436c78113f8a61e7fcc34db4117d14c0.tar.gz
In concurrency models long keepalive times are cheap (and thus
more likely to be used), this allows Rainbows! to gracefully
shut down more quickly.
Diffstat (limited to 'lib/rainbows/coolio')
-rw-r--r--lib/rainbows/coolio/heartbeat.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rainbows/coolio/heartbeat.rb b/lib/rainbows/coolio/heartbeat.rb
index f58ed33..3ae9e16 100644
--- a/lib/rainbows/coolio/heartbeat.rb
+++ b/lib/rainbows/coolio/heartbeat.rb
@@ -9,6 +9,7 @@ class Rainbows::Coolio::Heartbeat < Coolio::TimerWatcher
   KATO = Rainbows::Coolio::KATO
   CONN = Rainbows::Coolio::CONN
   Rainbows.config!(self, :keepalive_timeout)
+  Rainbows.at_quit { KATO.each_key { |client| client.timeout? }.clear }
 
   def on_timer
     if (ot = KEEPALIVE_TIMEOUT) >= 0