about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--test/test_connect_fd_leak.rb2
1 files changed, 1 insertions, 1 deletions
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