From e07ead79ac6e6897f5c6fa8d84a380ae99b028f8 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sun, 10 Jan 2016 11:19:44 +0100 Subject: always shedule on_loop/on_write on i/o to actively mitigate race-conditions, fixes #43 --- voctogui/lib/connection.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'voctogui') 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)) -- cgit v1.2.3