diff --git a/mitmproxy/script/concurrent.py b/mitmproxy/script/concurrent.py index 366929a5d..87cdca968 100644 --- a/mitmproxy/script/concurrent.py +++ b/mitmproxy/script/concurrent.py @@ -29,4 +29,7 @@ def concurrent(fn): "script.concurrent (%s)" % fn.__name__, target=run ).start() - return _concurrent + if "." in fn.__qualname__: + return staticmethod(_concurrent) + else: + return _concurrent