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:
parent
e905c84494
commit
829fcd0612
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue