aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/controller.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/controller.py')
-rw-r--r--libmproxy/controller.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/libmproxy/controller.py b/libmproxy/controller.py
index c36bb9df..849d998b 100644
--- a/libmproxy/controller.py
+++ b/libmproxy/controller.py
@@ -56,13 +56,14 @@ class Channel:
def ask(self, m):
"""
- Send a message to the master, and wait for a response.
+ Decorate a message with a reply attribute, and send it to the
+ master. then wait for a response.
"""
m.reply = Reply(m)
self.q.put(m)
while not should_exit:
try:
- # The timeout is here so we can handle a should_exit event.
+ # The timeout is here so we can handle a should_exit event.
g = m.reply.q.get(timeout=0.5)
except Queue.Empty:
continue
@@ -70,9 +71,10 @@ class Channel:
def tell(self, m):
"""
- Send a message to the master, and keep going.
+ Decorate a message with a dummy reply attribute, send it to the
+ master, then return immediately.
"""
- m.reply = None
+ m.reply = DummyReply()
self.q.put(m)