From dfd7e076bb06e02ea8e48ccabb3e32c4abf702b4 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 26 Sep 2026 11:41:38 +0900 Subject: [PATCH] Rescue SystemCallError in the TLS test server When the client rejects the certificate and closes the socket with part of the handshake still unread, Windows resets the connection and SSL_accept on the server thread raises Errno::ECONNRESET instead of SSLError. It escaped the thread and teardown re-raised it as a test error. https://github.com/ruby/ruby/actions/runs/36208437463/job/108309842285 Co-Authored-By: Claude Opus 5.5 --- test/net/smtp/test_sslcontext.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/net/smtp/test_sslcontext.rb b/test/net/smtp/test_sslcontext.rb index 7563d60..a04feea 100644 --- a/test/net/smtp/test_sslcontext.rb +++ b/test/net/smtp/test_sslcontext.rb @@ -52,7 +52,7 @@ def teardown sock = OpenSSL::SSL::SSLSocket.new(sock, ctx) sock.sync_close = true sock.accept - rescue OpenSSL::SSL::SSLError + rescue OpenSSL::SSL::SSLError, SystemCallError # The client must be raising SSLError, too end