8000 Catch `BrokenPipeError` in `SingleTLSLayerTestCase` (#3547) · urllib3/urllib3@a901452 · GitHub
[go: up one dir, main page]

Skip to content

Commit a901452

Browse files
authored
Catch BrokenPipeError in SingleTLSLayerTestCase (#3547)
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 37565dc commit a901452

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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, Con 4D95 nectionResetError):
125+
except (ConnectionAbortedError, ConnectionResetError, BrokenPipeError):
126126
return
127127

128128
chosen_handler = handler if handler else socket_handler

0 commit comments

Comments
 (0)
0