mirror of https://github.com/python/cpython
gh-100348: Fix ref cycle in `asyncio._SelectorSocketTransport` with `_read_ready_cb` (#100349)
This commit is contained in:
parent
39dfbb2d5d
commit
a6331b605e
|
@ -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…
Reference in New Issue