Skip to content

Commit

Permalink
fix: KeyboardInterrupt not being caught by server CLI
Browse files Browse the repository at this point in the history
Honestly no idea why moving the try/except worked...
  • Loading branch information
thegamecracks committed Mar 10, 2024
1 parent 142d333 commit bc1a249
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/dumdum/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ def main():
for channel in channels:
hc.add_channel(channel)

asyncio.run(host_server(hc, host, port))
try:
asyncio.run(host_server(hc, host, port))
except KeyboardInterrupt:
pass


def parse_channel(s: str) -> Channel:
Expand Down Expand Up @@ -179,7 +182,4 @@ def _handle_events(self, events: list[ServerEvent]) -> None:


if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
pass
main()

0 comments on commit bc1a249

Please sign in to comment.