diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-09-13 08:44:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-13 08:44:08 (GMT) |
commit | 97d7e65dfed1d42d40d9bc2f630af56240555f02 (patch) | |
tree | 94cd90a3f53521660559e502f3ec76f803434d36 /Lib/logging | |
parent | b8d1b9d7c697dd0401491b6d43047acbaf425f02 (diff) | |
download | cpython-97d7e65dfed1d42d40d9bc2f630af56240555f02.zip cpython-97d7e65dfed1d42d40d9bc2f630af56240555f02.tar.gz cpython-97d7e65dfed1d42d40d9bc2f630af56240555f02.tar.bz2 |
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).
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/config.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py index c16a75a..b08cba0 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -887,7 +887,7 @@ def listen(port=DEFAULT_LOGGING_CONFIG_PORT, verify=None): logging._acquireLock() abort = self.abort logging._releaseLock() - self.socket.close() + self.server_close() class Server(threading.Thread): |