MCPcopy Index your code
hub / github.com/python/cpython / cleanup

Method cleanup

Lib/test/test_asyncio/test_sendfile.py:185–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

183 self.reduce_send_buffer_size(sock)
184
185 def cleanup():
186 if proto.transport is not None:
187 # can be None if the task was cancelled before
188 # connection_made callback
189 proto.transport.close()
190 self.run_loop(proto.wait_closed())
191
192 server.close()
193 self.run_loop(server.wait_closed())
194
195 self.addCleanup(cleanup)
196

Callers

nothing calls this directly

Calls 3

closeMethod · 0.45
run_loopMethod · 0.45
wait_closedMethod · 0.45

Tested by

no test coverage detected