From 1b024d48169442a5498d490699ea1eee41563587 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 20 Jan 2011 15:27:46 -0800 Subject: epoll: close epoll descriptor on graceful shutdown This allows us to gracefully shutdown more quickly. --- lib/rainbows/epoll.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rainbows/epoll.rb b/lib/rainbows/epoll.rb index 52216b3..2f1d4a7 100644 --- a/lib/rainbows/epoll.rb +++ b/lib/rainbows/epoll.rb @@ -15,6 +15,7 @@ module Rainbows::Epoll def worker_loop(worker) # :nodoc: init_worker_process(worker) + trap(:QUIT) { Rainbows.quit!; State::EP.close unless State::EP.closed? } Rainbows::Client.__send__ :include, Client Server.run end -- cgit v1.2.3-24-ge0c7