Skip to content

Commit 5161c39

Browse files
committed
SingleTLSLayerTestCase: Catch BrokenPipeError
OpenSSL 3.4.0 returns `ERR_LIB_SYS` in some more situations than it used to. In the case exercised by `SingleTLSLayerTestCase.test_close_after_handshake`, python/cpython#127361 (also backported to the 3.12 and 3.13 branches) turns this into `BrokenPipeError`. It seems reasonable to treat this in the same way as `ConnectionAbortedError` and `ConnectionResetError`.
1 parent 1111e6c commit 5161c39

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎test/test_ssltransport.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def socket_handler(listener: socket.socket) -> None:
122122
return
123123
validate_request(request)
124124
ssock.send(sample_response())
125-
except (ConnectionAbortedError, ConnectionResetError):
125+
except (ConnectionAbortedError, ConnectionResetError, BrokenPipeError):
126126
return
127127

128128
chosen_handler = handler if handler else socket_handler

0 commit comments

Comments
 (0)