mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-22 19:47:56 +08:00
fix #451
This commit is contained in:
@@ -36,7 +36,7 @@ class ScriptContext:
|
||||
Replay the request on the current flow. The response will be added
|
||||
to the flow object.
|
||||
"""
|
||||
self._master.replay_request(f)
|
||||
return self._master.replay_request(f, block=True, run_scripthooks=False)
|
||||
|
||||
@property
|
||||
def app_registry(self):
|
||||
@@ -139,8 +139,12 @@ def _handle_concurrent_reply(fn, o, *args, **kwargs):
|
||||
|
||||
def run():
|
||||
fn(*args, **kwargs)
|
||||
o.reply() # If the script did not call .reply(), we have to do it now.
|
||||
threading.Thread(target=run, name="ScriptThread").start()
|
||||
reply_proxy() # If the script did not call .reply(), we have to do it now.
|
||||
ScriptThread(target=run).start()
|
||||
|
||||
|
||||
class ScriptThread(threading.Thread):
|
||||
name = "ScriptThread"
|
||||
|
||||
|
||||
def concurrent(fn):
|
||||
|
||||
Reference in New Issue
Block a user