diff options
Diffstat (limited to 'mitmproxy/platform/windows.py')
-rw-r--r-- | mitmproxy/platform/windows.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mitmproxy/platform/windows.py b/mitmproxy/platform/windows.py index 4a7779c6..a59fe25f 100644 --- a/mitmproxy/platform/windows.py +++ b/mitmproxy/platform/windows.py @@ -19,10 +19,13 @@ PROXY_API_PORT = 8085 class Resolver: def __init__(self): - TransparentProxy.setup() self.socket = None self.lock = threading.RLock() - self._connect() + + def setup(self): + with self.lock: + TransparentProxy.setup() + self._connect() def _connect(self): if self.socket: |