bpo-33540: Fix socketserver.ThreadingMixIn if block_on_close=False (GH-7310)

socketserver.ThreadingMixIn no longer tracks active threads if
block_on_close is false.
This commit is contained in:
Victor Stinner 2018-06-01 14:21:34 +02:00 committed by GitHub
parent e905c84494
commit 829fcd0612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -655,7 +655,7 @@ class ThreadingMixIn:
t = threading.Thread(target = self.process_request_thread, t = threading.Thread(target = self.process_request_thread,
args = (request, client_address)) args = (request, client_address))
t.daemon = self.daemon_threads t.daemon = self.daemon_threads
if not t.daemon: if not t.daemon and self.block_on_close:
if self._threads is None: if self._threads is None:
self._threads = [] self._threads = []
self._threads.append(t) self._threads.append(t)