[3.6] bpo-29743: Closing transport during handshake process leaks socket (#480) by 1st1 · Pull Request #2044 · python/cpython
def test_cancel_handshake(self): # Python issue #23197: cancelling a handshake must not raise an
def test_close_during_handshake(self): # bpo-29743 Closing transport during handshake process leaks socket waiter = asyncio.Future(loop=self.loop) ssl_proto = self.ssl_protocol(waiter)
def do_handshake(callback): return []
transport = self.connection_made(ssl_proto) test_utils.run_briefly(self.loop)
ssl_proto._app_transport.close() self.assertTrue(transport.abort.called)
def test_get_extra_info_on_closed_connection(self): waiter = asyncio.Future(loop=self.loop) ssl_proto = self.ssl_protocol(waiter)