summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorRichard Kojedzinszky <rkojedzinszky@users.noreply.github.com>2022-12-20 10:40:56 (GMT)
committerGitHub <noreply@github.com>2022-12-20 10:40:56 (GMT)
commita6331b605e8044a205a113e1db87d2b0a53d0222 (patch)
tree8a7fa159f027796a38d714c740716e09324e681a /Lib/asyncio
parent39dfbb2d5dc47635f332bc13ca667293de6989ab (diff)
downloadcpython-a6331b605e8044a205a113e1db87d2b0a53d0222.zip
cpython-a6331b605e8044a205a113e1db87d2b0a53d0222.tar.gz
cpython-a6331b605e8044a205a113e1db87d2b0a53d0222.tar.bz2
gh-100348: Fix ref cycle in `asyncio._SelectorSocketTransport` with `_read_ready_cb` (#100349)
Diffstat (limited to 'Lib/asyncio')
-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 3d30006..74f289f 100644
--- a/Lib/asyncio/selector_events.py
+++ b/Lib/asyncio/selector_events.py
@@ -1133,6 +1133,10 @@ class _SelectorSocketTransport(_SelectorTransport):
def _reset_empty_waiter(self):
self._empty_waiter = None
+ def close(self):
+ self._read_ready_cb = None
+ super().close()
+
class _SelectorDatagramTransport(_SelectorTransport, transports.DatagramTransport):