about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/rainbows/epoll.rb1
1 files changed, 1 insertions, 0 deletions
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