about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-11-05 07:05:04 +0000
committerEric Wong <normalperson@yhbt.net>2013-11-05 07:05:49 +0000
commit8297d1dc600e34db29bb071ff7b94f6aaa7b45c5 (patch)
tree9bfbaa55d56525035bbe16e72a812fc01ec7c963
parentf76c6ba8aa64018fcfac6f1c1989ddc828bd180b (diff)
downloadraindrops-8297d1dc600e34db29bb071ff7b94f6aaa7b45c5.tar.gz
Some projects may load parts of Unicorn and not others.
-rw-r--r--lib/raindrops/last_data_recv.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/raindrops/last_data_recv.rb b/lib/raindrops/last_data_recv.rb
index f96a776..b4808a1 100644
--- a/lib/raindrops/last_data_recv.rb
+++ b/lib/raindrops/last_data_recv.rb
@@ -73,7 +73,9 @@ class Raindrops::LastDataRecv
   # :startdoc
 
   def initialize(opts = {})
-    Raindrops::Aggregate::LastDataRecv.cornify! if defined?(Unicorn)
+    if defined?(Unicorn::HttpServer::LISTENERS)
+      Raindrops::Aggregate::LastDataRecv.cornify!
+    end
     @aggregate =
       opts[:aggregate] || Raindrops::Aggregate::LastDataRecv.default_aggregate
   end