diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2021-12-12 00:28:35 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2021-12-20 19:07:03 +0900 |
commit | 2e089c19162ad4b295a5db85d70761da7e399213 (patch) | |
tree | 2f6a0360bc68ef7c1583525c346f45795c262fed | |
parent | b1ee2f23b28c2d0b14fd9b4b9fef13e870370746 (diff) | |
download | ruby-openssl-2e089c19162ad4b295a5db85d70761da7e399213.tar.gz |
ssl: update test_accept_errors_include_peeraddr test case
Use a different invalid data example to prevent SSLSocket#accept from
reaching EOF.
-rw-r--r-- | test/openssl/test_ssl.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb index 70c46a93..22691292 100644 --- a/test/openssl/test_ssl.rb +++ b/test/openssl/test_ssl.rb @@ -893,14 +893,12 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase end end - begin - sock = TCPSocket.new("127.0.0.1", port) - sock.puts "abc" - ensure - sock&.close - end + sock = TCPSocket.new("127.0.0.1", port) + sock << "\x00" * 1024 assert t.join + ensure + sock&.close server.close end |