mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-34745: Fix asyncio sslproto memory issues (GH-12386)
* Fix handshake timeout leak in asyncio/sslproto Refs MagicStack/uvloop#222 * Break circular ref _SSLPipe <-> SSLProtocol * bpo-34745: Fix asyncio ssl memory leak * Break circular ref SSLProtocol <-> UserProtocol * Add NEWS entry
This commit is contained in:
parent
06e1e68822
commit
f683f46425
3 changed files with 77 additions and 0 deletions
|
@ -498,7 +498,11 @@ class SSLProtocol(protocols.Protocol):
|
|||
self._app_transport._closed = True
|
||||
self._transport = None
|
||||
self._app_transport = None
|
||||
if getattr(self, '_handshake_timeout_handle', None):
|
||||
self._handshake_timeout_handle.cancel()
|
||||
self._wakeup_waiter(exc)
|
||||
self._app_protocol = None
|
||||
self._sslpipe = None
|
||||
|
||||
def pause_writing(self):
|
||||
"""Called when the low-level transport's buffer goes over
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue