diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2011-11-04 09:16:28 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2011-11-04 09:16:28 (GMT) |
commit | 12b66b5217d7cbccbeb918683f6df8ab9ae84c3d (patch) | |
tree | 8234a13900a989e53f34919bf361739e53d2fb9a /Lib | |
parent | dcfde5aac99cd1ff7e43b75103feba44a453055a (diff) | |
download | cpython-12b66b5217d7cbccbeb918683f6df8ab9ae84c3d.zip cpython-12b66b5217d7cbccbeb918683f6df8ab9ae84c3d.tar.gz cpython-12b66b5217d7cbccbeb918683f6df8ab9ae84c3d.tar.bz2 |
Closes #13140: Fix the daemon_threads attribute of ThreadingMixIn.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/socketserver.py | 3 | ||||
-rw-r--r-- | Lib/test/test_socketserver.py | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/Lib/socketserver.py b/Lib/socketserver.py index 0e2ba83..cd367f1 100644 --- a/Lib/socketserver.py +++ b/Lib/socketserver.py @@ -588,8 +588,7 @@ class ThreadingMixIn: """Start a new thread to process the request.""" t = threading.Thread(target = self.process_request_thread, args = (request, client_address)) - if self.daemon_threads: - t.daemon = True + t.daemon = self.daemon_threads t.start() diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py index 08d79c0..b3660c1 100644 --- a/Lib/test/test_socketserver.py +++ b/Lib/test/test_socketserver.py @@ -123,7 +123,6 @@ class SocketServerTest(unittest.TestCase): self.assertEqual(server.server_address, server.socket.getsockname()) return server - @unittest.skipUnless(threading, 'Threading required for this test.') @reap_threads def run_server(self, svrcls, hdlrbase, testfunc): server = self.make_server(self.pickaddr(svrcls.address_family), |