Skip to content

Commit 97d7e65

Browse files
authored
bpo-30830: logging.config.listen() calls server_close() (#3524)
The ConfigSocketReceiver.serve_until_stopped() method from logging.config.listen() now calls server_close() (of socketserver.ThreadingTCPServer) rather than closing manually the socket. While this change has no effect yet, it will help to prevent dangling threads once ThreadingTCPServer.server_close() will join spawned threads (bpo-31233).
1 parent b8d1b9d commit 97d7e65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/logging/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ def serve_until_stopped(self):
887887
logging._acquireLock()
888888
abort = self.abort
889889
logging._releaseLock()
890-
self.socket.close()
890+
self.server_close()
891891

892892
class Server(threading.Thread):
893893

0 commit comments

Comments
 (0)