summaryrefslogtreecommitdiff
path: root/test/openssl
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-30 14:15:48 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-30 14:15:48 +0000
commit3ac2c3472af0dfce9a79ed3ffa6ed720caaf98e2 (patch)
tree5b0b763f23c89cb8a74dca9e400638eb20170467 /test/openssl
parent895c7cb3c4f5d3c72e999d204a7eaa88e800b2be (diff)
* test/openssl/test_ssl.rb (start_server): shutdown TCPServer before
close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl')
-rw-r--r--test/openssl/test_ssl.rb19
1 files changed, 12 insertions, 7 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index 50659f1..876ca4c 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -128,14 +128,19 @@ class OpenSSL::TestSSL < Test::Unit::TestCase
block.call(server, port.to_i)
ensure
- tcps.close if (tcps)
- if (server)
- server.join(5)
- if server.alive?
- server.kill
- server.join
- flunk("TCPServer was closed and SSLServer is still alive") unless $!
+ tcps.shutdown if (tcps)
+ begin
+ if (server)
+ server.join(5)
+ if server.alive?
+ server.kill
+ server.join
+ flunk("TCPServer was closed and SSLServer is still alive") unless $!
+ end
end
+ rescue Errno::EINVAL, Errno::EBADF
+ ensure
+ tcps.close if (tcps)
end
end
end