Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/trio/_tests/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,14 @@ def ssl_echo_serve_sync(
# other side has initiated a graceful shutdown; we try to
# respond in kind but it's legal for them to have already
# gone away.
with suppress(BrokenPipeError, ssl.SSLZeroReturnError):
wrapped.unwrap()
try:
with suppress(BrokenPipeError, ssl.SSLZeroReturnError):
wrapped.unwrap()
except ssl.SSLError as unwrap_exc: # pragma: no cover
# PyPy reports EPIPE here as SSLError("Broken pipe")
# rather than BrokenPipeError.
if "Broken pipe" not in str(unwrap_exc):
raise
return
wrapped.sendall(data)
# This is an obscure workaround for an openssl bug. In server mode, in
Expand Down
Loading