diff options
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? |