Skip to content

Commit 2e089c1

Browse files
committed
ssl: update test_accept_errors_include_peeraddr test case
Use a different invalid data example to prevent SSLSocket#accept from reaching EOF.
1 parent b1ee2f2 commit 2e089c1

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/openssl/test_ssl.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -893,14 +893,12 @@ def test_accept_errors_include_peeraddr
893893
end
894894
end
895895

896-
begin
897-
sock = TCPSocket.new("127.0.0.1", port)
898-
sock.puts "abc"
899-
ensure
900-
sock&.close
901-
end
896+
sock = TCPSocket.new("127.0.0.1", port)
897+
sock << "\x00" * 1024
902898

903899
assert t.join
900+
ensure
901+
sock&.close
904902
server.close
905903
end
906904

0 commit comments

Comments
 (0)