mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-100348: Fix ref cycle in asyncio._SelectorSocketTransport
with _read_ready_cb
(#100349)
This commit is contained in:
parent
39dfbb2d5d
commit
a6331b605e
2 changed files with 6 additions and 0 deletions
|
@ -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):
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Fix ref cycle in :class:`!asyncio._SelectorSocketTransport` by removing ``_read_ready_cb`` in ``close``.
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue