From 79d2abb23ab869d0345f8392130e1d00e15dc704 Mon Sep 17 00:00:00 2001 From: Thomas Roth Date: Wed, 24 Feb 2010 23:25:37 +0100 Subject: [PATCH] Fixes blocking problem with a workaround which sets a timeout of 0.1 seconds. --- libmproxy/console.py | 1 + todo | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libmproxy/console.py b/libmproxy/console.py index f1dc83968..677f8627e 100644 --- a/libmproxy/console.py +++ b/libmproxy/console.py @@ -961,6 +961,7 @@ class ConsoleMaster(controller.Master): size = self.drawscreen() self.statusbar.redraw() self.tick(q) + self.ui.set_input_timeouts(max_wait=0.1) keys = self.ui.get_input() for k in keys: if self.prompting: diff --git a/todo b/todo index 297e36072..0362cf355 100644 --- a/todo +++ b/todo @@ -9,11 +9,11 @@ Future: - Saving contents to file - Shortcut for viewing in pager - Serializing and de-serializing requests and responses. + - Use real non-blocking input handling to minimize cpu load. Bugs: - - get_input() is blocking the complete program. - Exception handling for regular expression compiler in filt.py. - Fix crash cause on undefined request in libmproxy/console.py:543 - Fix crash on illegal regular expression on libmproxy/filt.py:76