aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kriechbaumer <Kriechi@users.noreply.github.com>2017-05-16 20:44:24 +0800
committerGitHub <noreply@github.com>2017-05-16 20:44:24 +0800
commitdd3067ab6e1d60363c0b9fff1b680689121bf649 (patch)
tree5f521ae9ad96aa85957646aeb3147ff1b1a2f649
parent69c5a0b6993f70340a0a4b99159086c638d77103 (diff)
parenta03a56f4dcc13e3b510dcb0f3c826b7420d15260 (diff)
downloadmitmproxy-dd3067ab6e1d60363c0b9fff1b680689121bf649.tar.gz
mitmproxy-dd3067ab6e1d60363c0b9fff1b680689121bf649.tar.bz2
mitmproxy-dd3067ab6e1d60363c0b9fff1b680689121bf649.zip
Merge pull request #2335 from cortesi/shutdown
net.tcp: server should be in shut-down state before start
-rw-r--r--mitmproxy/net/tcp.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/mitmproxy/net/tcp.py b/mitmproxy/net/tcp.py
index 372329d9..5ed4aa06 100644
--- a/mitmproxy/net/tcp.py
+++ b/mitmproxy/net/tcp.py
@@ -847,6 +847,7 @@ class TCPServer:
def __init__(self, address):
self.address = address
self.__is_shut_down = threading.Event()
+ self.__is_shut_down.set()
self.__shutdown_request = False
if self.address == 'localhost':