Skip to content

Commit

Permalink
ssl: update test_accept_errors_include_peeraddr test case
Browse files Browse the repository at this point in the history
Use a different invalid data example to prevent SSLSocket#accept from
reaching EOF.
  • Loading branch information
rhenium committed Dec 20, 2021
1 parent b1ee2f2 commit 2e089c1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/openssl/test_ssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -893,14 +893,12 @@ def test_accept_errors_include_peeraddr
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

Expand Down

0 comments on commit 2e089c1

Please sign in to comment.