diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2020-03-31 19:07:27 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-31 19:07:27 +0900 |
commit | 0d15901b86ca2cecac5229daff730d00ee2429a9 (patch) | |
tree | 70f0eeae25302ecc8ef965b0350c2e10bc0212db | |
parent | 2c43241dc0ed90062f160d24fc9fcae7bec86518 (diff) | |
parent | 96a481b5728c12d6b5f4d99040ad2c77443c94a2 (diff) | |
download | ruby-openssl-0d15901b86ca2cecac5229daff730d00ee2429a9.tar.gz |
Merge pull request #357 from mame/ignore-SSLError-when-socket-is-forcibly-closed
test/openssl/test_ssl.rb: ignore SSLError when the connection is closed
-rw-r--r-- | test/openssl/test_ssl.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb index ce899ba0..4598927a 100644 --- a/test/openssl/test_ssl.rb +++ b/test/openssl/test_ssl.rb @@ -1398,8 +1398,13 @@ end } end + def readwrite_loop_safe(ctx, ssl) + readwrite_loop(ctx, ssl) + rescue OpenSSL::SSL::SSLError + end + def test_close_after_socket_close - start_server { |port| + start_server(server_proc: method(:readwrite_loop_safe)) { |port| sock = TCPSocket.new("127.0.0.1", port) ssl = OpenSSL::SSL::SSLSocket.new(sock) ssl.connect |