diff options
author | nobu <nobu@ruby-lang.org> | 2015-07-29 12:45:32 +0000 |
---|---|---|
committer | nobu <nobu@ruby-lang.org> | 2015-07-29 12:45:32 +0000 |
commit | a51f9834113ae177fcfe4d8261541068c81e7da8 (patch) | |
tree | 240e196a0f32d4452fb2ecc417757dea6327e583 /test/test_pair.rb | |
parent | a2c07fd6079c26ed452a8020520d24c0c0c26925 (diff) | |
download | ruby-openssl-history-a51f9834113ae177fcfe4d8261541068c81e7da8.tar.gz |
test_pair.rb: thread leak
* test/openssl/test_pair.rb (test_ecdh_callback): join client
thread before closing sockets.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_pair.rb')
-rw-r--r-- | test/test_pair.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_pair.rb b/test/test_pair.rb index 5bf74e5..588098c 100644 --- a/test/test_pair.rb +++ b/test/test_pair.rb @@ -301,6 +301,7 @@ module OpenSSL::TestPairM assert_equal s1, t.value assert accept ensure + t.join s1.close if s1 s2.close if s2 sock1.close if sock1 @@ -324,6 +325,7 @@ module OpenSSL::TestPairM assert_equal s1, t.value assert accept ensure + t.join s1.close if s1 s2.close if s2 sock1.close if sock1 @@ -363,12 +365,12 @@ module OpenSSL::TestPairM assert called, 'ecdh callback should be called' ensure + th.join s1.close if s1 s2.close if s2 sock1.close if sock1 sock2.close if sock2 accepted.close if accepted.respond_to?(:close) - th.join rescue nil end def test_connect_accept_nonblock_no_exception @@ -411,6 +413,7 @@ module OpenSSL::TestPairM assert_includes([s1, :wait_readable, :wait_writable ], rv) end ensure + th.join s1.close if s1 s2.close if s2 sock1.close if sock1 |