Double Ctrl-C or other situation could cause ugly traceback, avoid that situation by exiting quietly on CancelledError and KeyboardInterrupt.

This commit is contained in:
2026-09-20 01:14:47 +00:00
parent e8e56ce2ea
commit 1f5e52505f
+3
View File
@@ -371,7 +371,10 @@ def main():
if not args.url.startswith(("ws://", "wss://")):
p.error("url must start with ws:// or wss://")
try:
asyncio.run(serve(args.url, SeedX()))
except (KeyboardInterrupt, asyncio.CancelledError):
pass
if __name__ == "__main__":