diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-22 11:12:06 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-22 11:12:06 +0000 |
commit | 2d302dfd40ee9a4b3183415b19dbc22cf9106ba3 (patch) | |
tree | 4d3bfc69c17e6ccccb62391d1a91e98567af921d /test/openssl | |
parent | 122595c263d67e0a32175833ed0ad6c7482b767e (diff) |
* lib/webrick/server.rb (WEBrick::GenericServer#shutdown):
rescue Errno::ENOTCONN and close. [ruby-dev:35896]
* test/openssl/test_ssl.rb (OpenSSL#start_server): ditto.
[ruby-dev:35897]
* lib/net/imap.rb (Net::IMAP#disconnect): ditto. [ruby-dev:35898]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl')
-rw-r--r-- | test/openssl/test_ssl.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb index eadff733a6..ea959892f3 100644 --- a/test/openssl/test_ssl.rb +++ b/test/openssl/test_ssl.rb @@ -129,7 +129,14 @@ class OpenSSL::TestSSL < Test::Unit::TestCase block.call(server, port.to_i) ensure begin - tcps.shutdown if (tcps) + begin + tcps.shutdown + rescue Errno::ENOTCONN + # when `Errno::ENOTCONN: Socket is not connected' on some platforms, + # call #close instead of #shutdown. + tcps.close + tcps = nil + end if (tcps) if (server) server.join(5) if server.alive? |