Skip to content

Commit 829fcd0

Browse files
authored
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.
1 parent e905c84 commit 829fcd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/socketserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ def process_request(self, request, client_address):
655655
t = threading.Thread(target = self.process_request_thread,
656656
args = (request, client_address))
657657
t.daemon = self.daemon_threads
658-
if not t.daemon:
658+
if not t.daemon and self.block_on_close:
659659
if self._threads is None:
660660
self._threads = []
661661
self._threads.append(t)

0 commit comments

Comments
 (0)