diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-01 15:56:29 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-01 15:56:29 +0000 |
commit | a25e9259d5d7e6f17513b0f922af1a93dfdeec71 (patch) | |
tree | aabf96a1b8263753a07bc3916bbf260442617ec3 /test/openssl/utils.rb | |
parent | c21ae1e1fda5b3f91c01f5aaa8fd2213e9fe27c6 (diff) | |
download | ruby-a25e9259d5d7e6f17513b0f922af1a93dfdeec71.tar.gz |
ignore_ssl_accept_error option is changed to ignore_listener_error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl/utils.rb')
-rw-r--r-- | test/openssl/utils.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/openssl/utils.rb b/test/openssl/utils.rb index 6a92e040c5..433dda731a 100644 --- a/test/openssl/utils.rb +++ b/test/openssl/utils.rb @@ -240,7 +240,7 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC ssl.close rescue nil end - def server_loop(ctx, ssls, stop_pipe_r, ignore_ssl_accept_error, server_proc, threads) + def server_loop(ctx, ssls, stop_pipe_r, ignore_listener_error, server_proc, threads) loop do ssl = nil begin @@ -250,7 +250,7 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC end ssl = ssls.accept rescue OpenSSL::SSL::SSLError - if ignore_ssl_accept_error + if ignore_listener_error retry else raise @@ -263,13 +263,16 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC threads << th end rescue Errno::EBADF, IOError, Errno::EINVAL, Errno::ECONNABORTED, Errno::ENOTSOCK, Errno::ECONNRESET + if !ignore_listener_error + raise + end end def start_server(port0, verify_mode, start_immediately, args = {}, &block) IO.pipe {|stop_pipe_r, stop_pipe_w| ctx_proc = args[:ctx_proc] server_proc = args[:server_proc] - ignore_ssl_accept_error = args.fetch(:ignore_ssl_accept_error, true) + ignore_listener_error = args.fetch(:ignore_listener_error, true) server_proc ||= method(:readwrite_loop) store = OpenSSL::X509::Store.new @@ -301,7 +304,7 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC begin server = Thread.new do begin - server_loop(ctx, ssls, stop_pipe_r, ignore_ssl_accept_error, server_proc, threads) + server_loop(ctx, ssls, stop_pipe_r, ignore_listener_error, server_proc, threads) ensure tcps.close end |