about summary refs log tree commit homepage
path: root/lib/rainbows.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-01-17 02:03:04 +0000
committerEric Wong <normalperson@yhbt.net>2014-01-17 08:34:29 +0000
commit3e701ee74ff29bdf5daa3249acede5a85a2b0097 (patch)
tree176888175c2b975f9a1ac1a33f0452e6b3d3bf86 /lib/rainbows.rb
parent1b3e68e3eac0c3fbb2a32e4fddd26ee8a50ec627 (diff)
downloadrainbows-3e701ee74ff29bdf5daa3249acede5a85a2b0097.tar.gz
Internal reworking of unicorn 4.8.0 completely broke us(!).
This commit fixes things, but it means we no longer support
unicorn <= 4.7.  Sorry about that.
Diffstat (limited to 'lib/rainbows.rb')
-rw-r--r--lib/rainbows.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rainbows.rb b/lib/rainbows.rb
index bfa1ba0..82a8448 100644
--- a/lib/rainbows.rb
+++ b/lib/rainbows.rb
@@ -55,6 +55,7 @@ module Rainbows
     attr_reader :alive
     attr_writer :worker
     attr_writer :forked
+    attr_writer :readers
   end
 
   def self.config!(mod, *opts)
@@ -88,7 +89,9 @@ module Rainbows
       @alive = false
       Rainbows::HttpParser.quit
       @expire = Time.now + (@server.timeout * 2.0)
-      Unicorn::HttpServer::LISTENERS.each { |s| s.close rescue nil }.clear
+      tmp = @readers.dup
+      @readers.clear
+      tmp.each { |s| s.close rescue nil }.clear
       @at_quit.each { |task| task.call }
     end
     false