From: Eric Wong <e@80x24.org>
To: kgio-public@bogomips.org
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: <20191214175814.8550-2-e@80x24.org> (raw)
In-Reply-To: <20191214175814.8550-1-e@80x24.org>
---
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 = Kgio::UNIXSocket.new(path)
rescue Errno::ENOENT
end while (nr += 1) < 10000
- sock.close
+ sock.close if sock
end
end
next prev parent 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/kgio/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191214175814.8550-2-e@80x24.org \
--to=e@80x24.org \
--cc=kgio-public@bogomips.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
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
https://yhbt.net/kgio.git/
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).