raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / Atom feed
From: Aman Gupta <aman@tmm1.net>
To: raindrops@librelist.org
Subject: [PATCH] avoid calling tcp_listener_stats when it is not available
Date: Fri,  6 Jan 2012 23:48:41 -0800
Message-ID: <1325922521-53409-2-git-send-email-aman@tmm1.net> (raw)
In-Reply-To: <1325922521-53409-1-git-send-email-aman@tmm1.net>

Signed-off-by: Aman Gupta <aman@tmm1.net>
---
 lib/raindrops/middleware.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/raindrops/middleware.rb b/lib/raindrops/middleware.rb
index a411de7..7c647ec 100644
--- a/lib/raindrops/middleware.rb
+++ b/lib/raindrops/middleware.rb
@@ -130,7 +130,7 @@ class Raindrops::Middleware
     body = "calling: #{@stats.calling}\n" \
            "writing: #{@stats.writing}\n"
 
-    if defined?(Raindrops::Linux)
+    if defined?(Raindrops::Linux.tcp_listener_stats)
       Raindrops::Linux.tcp_listener_stats(@tcp).each do |addr,stats|
         body << "#{addr} active: #{stats.active}\n" \
                 "#{addr} queued: #{stats.queued}\n"
-- 
1.7.5.3



  reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-07  7:48 [PATCH] fix ListenStats documentation error in Raindrops::Linux.unix_listener_stats Aman Gupta
2012-01-07  7:48 ` Aman Gupta [this message]
2012-01-07  8:05   ` [PATCH] avoid calling tcp_listener_stats when it is not available Eric Wong

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://bogomips.org/raindrops/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1325922521-53409-2-git-send-email-aman@tmm1.net \
    --to=aman@tmm1.net \
    --cc=raindrops@librelist.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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