kgio RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <>
Subject: [PATCH 1/2] test_connect_fd_leak: do not close socket if non-existent
Date: Sat, 14 Dec 2019 17:58:13 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

 test/test_connect_fd_leak.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test_connect_fd_leak.rb b/test/test_connect_fd_leak.rb
index 034fe5b..b1326f3 100644
--- a/test/test_connect_fd_leak.rb
+++ b/test/test_connect_fd_leak.rb
@@ -13,6 +13,6 @@ class TestConnectFDLeak < Test::Unit::TestCase
       sock =
     rescue Errno::ENOENT
     end while (nr += 1) < 10000
-    sock.close
+    sock.close if sock

  reply	other threads:[~2019-12-14 17:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-14 17:58 [PATCH 0/2] fix some test failures/warnings with newer Rubies Eric Wong
2019-12-14 17:58 ` Eric Wong [this message]
2019-12-14 17:58 ` [PATCH 2/2] test_syssend: avoid warning on cleanup Eric Wong

Reply instructions:

You may reply publicly 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:

  List information:

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

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).