summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/selector_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio/selector_events.py')
-rw-r--r--Lib/asyncio/selector_events.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py
index 96e61f7..40df1b7d 100644
--- a/Lib/asyncio/selector_events.py
+++ b/Lib/asyncio/selector_events.py
@@ -222,6 +222,10 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
await waiter
except BaseException:
transport.close()
+ # gh-109534: When an exception is raised by the SSLProtocol object the
+ # exception set in this future can keep the protocol object alive and
+ # cause a reference cycle.
+ waiter = None
raise
# It's now up to the protocol to handle the connection.