Fixes #220 sslproto memory issue by fantix · Pull Request #222 · MagicStack/uvloop (original) (raw)
Oh I'm stupid, has been investigating why Test_UV_TCPSSL.test_handshake_timeout_handler_leak
passes locally while Travis is red ... it is actually failing for Test_AIO_TCPSSL
!! Let me see
Okay found the same (part of) bug in asyncio, skipping the test for now, I'll create another PR to fix in asyncio.
(So the bug is, the handshake timeout handle is never cancelled if the handshake was terminated early - an additional timeout for example. In this case, all objects in the reference chain including SSLProtocol, transport, SSLContext will remain in memory until the handle actually times out, thus it is some kind of a memory leak.)