From fcc39e1aaf6ca3171af00f5e602aa88370b7ef30 Mon Sep 17 00:00:00 2001 From: Henrik Nordstrom Date: Thu, 10 Feb 2011 02:56:14 +0100 Subject: [PATCH] Terminate workers when main thread terminates --- libmproxy/proxy.py | 1 + 1 file changed, 1 insertion(+) 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