diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 63f4ceb46..eefa69059 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