Skip to content

Commit

Permalink
UI: fixed high cpu usage while notification is shown
Browse files Browse the repository at this point in the history
closes #30
  • Loading branch information
gustavo-iniguez-goya committed May 24, 2020
1 parent 59c8a01 commit 61a65a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/opensnitch/dialogs/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ def promptUser(self, connection, is_local, peer):
def _timeout_worker(self):
while self._tick > 0 and self._done.is_set() is False:
t = threading.currentThread()
# stop only stops the coundtdown, not the thread itself.
if getattr(t, "stop", True):
self._tick = int(self._cfg.getSettings("global/default_timeout"))
time.sleep(1)
continue

self._tick -= 1
Expand Down

0 comments on commit 61a65a3

Please sign in to comment.