diff options
Diffstat (limited to 'mitmproxy/master.py')
-rw-r--r-- | mitmproxy/master.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mitmproxy/master.py b/mitmproxy/master.py index 8855452c..88c64a9f 100644 --- a/mitmproxy/master.py +++ b/mitmproxy/master.py @@ -76,12 +76,16 @@ class Master: def run(self): self.start() + running = False try: while not self.should_exit.is_set(): # Don't choose a very small timeout in Python 2: # https://github.com/mitmproxy/mitmproxy/issues/443 # TODO: Lower the timeout value if we move to Python 3. self.tick(0.1) + if not running: + running = True + self.addons.invoke_all_with_context("running") finally: self.shutdown() |