aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/controller.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/controller.py')
-rw-r--r--libmproxy/controller.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/libmproxy/controller.py b/libmproxy/controller.py
index 4a72cf80..c71088cb 100644
--- a/libmproxy/controller.py
+++ b/libmproxy/controller.py
@@ -89,7 +89,7 @@ class Master:
self.masterq = Queue.Queue()
self.should_exit = threading.Event()
- def tick(self, q):
+ def tick(self, q, timeout):
changed = False
try:
# This endless loop runs until the 'Queue.Empty'
@@ -97,8 +97,7 @@ class Master:
# the queue, this speeds up every request by 0.1 seconds,
# because get_input(..) function is not blocking.
while True:
- # Small timeout to prevent pegging the CPU
- msg = q.get(timeout=0.01)
+ msg = q.get(timeout=timeout)
self.handle(*msg)
changed = True
except Queue.Empty: