From ea6d0eab436c78113f8a61e7fcc34db4117d14c0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 20 May 2011 09:19:51 +0000 Subject: coolio* + *epoll*: drop keepalive clients on SIGQUIT In concurrency models long keepalive times are cheap (and thus more likely to be used), this allows Rainbows! to gracefully shut down more quickly. --- lib/rainbows/coolio/heartbeat.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/rainbows/coolio') 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 -- cgit v1.2.3-24-ge0c7