Fixed 100% cpu bug.

parent f75f3277
import curses
import sys
import threading
from time import sleep
from async import ClientConnection
from chat_window import ChatWindow
......@@ -102,6 +103,8 @@ class CLI:
c = self.stdscr.getch()
if c != curses.ERR and self.command_bar.handle_input(c):
break
# wait 1 milliseconds
sleep(.001)
except KeyboardInterrupt:
self.execute('quit')
......
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