diff --git a/scripts/translator.py b/scripts/translator.py index 04a119c..de1c2fb 100644 --- a/scripts/translator.py +++ b/scripts/translator.py @@ -371,7 +371,10 @@ def main(): if not args.url.startswith(("ws://", "wss://")): p.error("url must start with ws:// or wss://") - asyncio.run(serve(args.url, SeedX())) + try: + asyncio.run(serve(args.url, SeedX())) + except (KeyboardInterrupt, asyncio.CancelledError): + pass if __name__ == "__main__":