Skip to content

Commit c8e60d5

Browse files
[3.13] gh-151522: Guard against None transport in slow-socket SSL test (GH-151523) (#151530)
gh-151522: Guard against None transport in slow-socket SSL test (GH-151523) (cherry picked from commit 11f032f) Co-authored-by: Itamar Oren <itamarost@gmail.com>
1 parent 502534e commit c8e60d5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/test_asyncio/test_ssl.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,6 +1544,9 @@ async def client(addr):
15441544
# This triggers bug gh-115514, also tested using mocks in
15451545
# test.test_asyncio.test_selector_events.SelectorSocketTransportTests.test_write_buffer_after_close
15461546
socket_transport = writer.transport._ssl_protocol._transport
1547+
# connection_lost may have already cleared _transport.
1548+
if socket_transport is None:
1549+
return
15471550

15481551
class SocketWrapper:
15491552
def __init__(self, sock) -> None:

0 commit comments

Comments
 (0)