summaryrefslogtreecommitdiff
path: root/test/openssl/test_pair.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/openssl/test_pair.rb')
-rw-r--r--test/openssl/test_pair.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/openssl/test_pair.rb b/test/openssl/test_pair.rb
index d31781f6e7a..940fa0c0dbd 100644
--- a/test/openssl/test_pair.rb
+++ b/test/openssl/test_pair.rb
@@ -238,6 +238,8 @@ class OpenSSL::TestPair < Test::Unit::TestCase
s1.print "a\ndef"
assert_equal("a\n", s2.gets)
ensure
+ s1.close if s1 && !s1.closed?
+ s2.close if s2 && !s2.closed?
serv.close if serv && !serv.closed?
sock1.close if sock1 && !sock1.closed?
sock2.close if sock2 && !sock2.closed?