aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/proxy.py
diff options
context:
space:
mode:
authorHenrik Nordstrom <henrik@henriknordstrom.net>2011-02-10 02:56:14 +0100
committerHenrik Nordstrom <henrik@henriknordstrom.net>2011-02-10 02:59:51 +0100
commitfcc39e1aaf6ca3171af00f5e602aa88370b7ef30 (patch)
treee0cd11e70ba50d4cfa311472bdd6d3158fe2797f /libmproxy/proxy.py
parenteb15ef7b80434b857aae33256851a3202d13e429 (diff)
downloadmitmproxy-fcc39e1aaf6ca3171af00f5e602aa88370b7ef30.tar.gz
mitmproxy-fcc39e1aaf6ca3171af00f5e602aa88370b7ef30.tar.bz2
mitmproxy-fcc39e1aaf6ca3171af00f5e602aa88370b7ef30.zip
Terminate workers when main thread terminates
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r--libmproxy/proxy.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index 63f4ceb4..eefa6905 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -468,6 +468,7 @@ class ProxyHandler(SocketServer.StreamRequestHandler):
ServerBase = SocketServer.ThreadingTCPServer
+ServerBase.daemon_threads = True # Terminate workers when main thread terminates
class ProxyServer(ServerBase):
request_queue_size = 20
allow_reuse_address = True