summaryrefslogtreecommitdiff
path: root/voctogui/lib/connection.py
diff options
context:
space:
mode:
authorMaZderMind <git@mazdermind.de>2016-01-10 11:19:44 +0100
committerMaZderMind <git@mazdermind.de>2016-01-10 11:21:40 +0100
commite07ead79ac6e6897f5c6fa8d84a380ae99b028f8 (patch)
tree9f17fa3c0addd5730edf6b17040104c5295c9efe /voctogui/lib/connection.py
parentfd5a9c94892e0a890b6e0702c745e50e48f16f23 (diff)
always shedule on_loop/on_write on i/o to actively mitigate race-conditions, fixes #43
Diffstat (limited to 'voctogui/lib/connection.py')
-rw-r--r--voctogui/lib/connection.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/voctogui/lib/connection.py b/voctogui/lib/connection.py
index 2a6aaf5..71c6588 100644
--- a/voctogui/lib/connection.py
+++ b/voctogui/lib/connection.py
@@ -79,9 +79,8 @@ def on_data(conn, _, leftovers, *args):
log.debug("got line: %r", line)
line = line.strip()
- if command_queue.empty():
- log.debug('command_queue was empty, re-starting on_loop scheduling')
- GObject.idle_add(on_loop)
+ log.debug('re-starting on_loop scheduling')
+ GObject.idle_add(on_loop)
command_queue.put((line, conn))