Commit 9f64ce5e by Oleksandr Barabash

keyboard interrupt handler added

parent 21277593
......@@ -208,12 +208,15 @@ def main(_argv) -> int:
io_loop))
thread = Thread(target=io_loop.run_forever)
thread.start()
try:
while True:
command = input().strip().lower()[:1]
if command == "q":
stop_server(ws_client, packet_logger, io_loop)(None, None)
thread.join()
break
except KeyboardInterrupt:
stop_server(ws_client, packet_logger, io_loop)(None, None)
return 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment