Skip to content

Commit 0d15901

Browse files
authored
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
2 parents 2c43241 + 96a481b commit 0d15901

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/openssl/test_ssl.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,8 +1398,13 @@ def test_npn_selected_protocol_too_long
13981398
}
13991399
end
14001400

1401+
def readwrite_loop_safe(ctx, ssl)
1402+
readwrite_loop(ctx, ssl)
1403+
rescue OpenSSL::SSL::SSLError
1404+
end
1405+
14011406
def test_close_after_socket_close
1402-
start_server { |port|
1407+
start_server(server_proc: method(:readwrite_loop_safe)) { |port|
14031408
sock = TCPSocket.new("127.0.0.1", port)
14041409
ssl = OpenSSL::SSL::SSLSocket.new(sock)
14051410
ssl.connect

0 commit comments

Comments
 (0)