diff options
Diffstat (limited to 'libmproxy/controller.py')
-rw-r--r-- | libmproxy/controller.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libmproxy/controller.py b/libmproxy/controller.py index ddfbe7f1..468092b7 100644 --- a/libmproxy/controller.py +++ b/libmproxy/controller.py @@ -23,15 +23,18 @@ class Msg: self.q = Queue.Queue() self.acked = False - def ack(self, data=None): + def ack(self, data=False): self.acked = True - self.q.put(data or self) + if data is None: + self.q.put(data) + else: + self.q.put(data or self) def send(self, masterq): self.acked = False try: masterq.put(self, timeout=3) - return self.q.get(timeout=3) + return self.q.get() except (Queue.Empty, Queue.Full): return None |