raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / Atom feed
* [PATCH] last_data_recv: do not assume Unicorn includes all constants
@ 2013-11-05  7:07 Eric Wong
  0 siblings, 0 replies; 1+ messages in thread
From: Eric Wong @ 2013-11-05  7:07 UTC (permalink / raw)
  To: raindrops

Some projects may load parts of Unicorn and not others.
---
 lib/raindrops/last_data_recv.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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
-- 
Eric Wong


^ permalink raw reply	[flat|threaded] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-05  7:07 [PATCH] last_data_recv: do not assume Unicorn includes all constants Eric Wong

raindrops RubyGem user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/raindrops-public
	git clone --mirror http://ou63pmih66umazou.onion/raindrops-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.raindrops
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.raindrops

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox