diff options
Diffstat (limited to 'src_py')
| -rw-r--r-- | src_py/opcut/main.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src_py/opcut/main.py b/src_py/opcut/main.py index b428950..df9987f 100644 --- a/src_py/opcut/main.py +++ b/src_py/opcut/main.py @@ -116,7 +116,7 @@ def generate_output(output_type: common.OutputType, def server(host: str, port: int): """Run server""" - aio.init_asyncio() + loop = aio.init_asyncio() async def run(): server = await opcut.server.create(host, port) @@ -128,7 +128,7 @@ def server(host: str, await aio.uncancellable(server.async_close()) with contextlib.suppress(asyncio.CancelledError): - aio.run_asyncio(run()) + aio.run_asyncio(run(), loop=loop) if __name__ == '__main__': |
