Skip to content
Snippets Groups Projects
Commit bb7db307 authored by Sander Mathijs van Veen's avatar Sander Mathijs van Veen
Browse files

Fixed 100% cpu bug.

parent f75f3277
No related branches found
No related tags found
No related merge requests found
import curses import curses
import sys import sys
import threading import threading
from time import sleep
from async import ClientConnection from async import ClientConnection
from chat_window import ChatWindow from chat_window import ChatWindow
...@@ -102,6 +103,8 @@ class CLI: ...@@ -102,6 +103,8 @@ class CLI:
c = self.stdscr.getch() c = self.stdscr.getch()
if c != curses.ERR and self.command_bar.handle_input(c): if c != curses.ERR and self.command_bar.handle_input(c):
break break
# wait 1 milliseconds
sleep(.001)
except KeyboardInterrupt: except KeyboardInterrupt:
self.execute('quit') self.execute('quit')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment