MCPcopy Index your code
hub / github.com/masterking32/MasterHttpRelayVPN / _run

Function _run

main.py:334–348  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

332
333
334async def _run(config):
335 loop = asyncio.get_running_loop()
336 _log = logging.getLogger("asyncio")
337 loop.set_exception_handler(_make_exception_handler(_log))
338 server = ProxyServer(config)
339 try:
340 await server.start()
341 finally:
342 await server.stop()
343 # Cancel any tasks that leaked through (e.g. fire-and-forget pool tasks).
344 stray = [t for t in asyncio.all_tasks() if t is not asyncio.current_task()]
345 for t in stray:
346 t.cancel()
347 if stray:
348 await asyncio.gather(*stray, return_exceptions=True)
349
350
351if __name__ == "__main__":

Callers 1

mainFunction · 0.70

Calls 4

startMethod · 0.95
stopMethod · 0.95
ProxyServerClass · 0.90
_make_exception_handlerFunction · 0.85

Tested by

no test coverage detected