Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
Closed
Description
_SSLProtocolTransport
keeps reference to protocol after close. It leads to reference cyeles between the transport and the protocol and is bad for gc. Clearing this is better as it frees up the memory immediately without waiting for the gc. This causes memory leaks in some cases as if an exception occurs the deallocation is delayed even further as tracebacks keeps ref to frame and frame keeps locals alive.
cpython/Lib/asyncio/sslproto.py
Lines 102 to 111 in8d57423
defclose(self): | |
"""Close the transport. | |
Buffered data will be flushed asynchronously. No more data | |
will be received. After all buffered data is flushed, the | |
protocol's connection_lost() method will (eventually) called | |
with None as its argument. | |
""" | |
self._closed=True | |
self._ssl_protocol._start_shutdown() |
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status
Done