Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32fb6a8 commit 9fdd11bCopy full SHA for 9fdd11b
2 files changed
Lib/logging/config.py
@@ -917,8 +917,10 @@ def stopListening():
917
Stop the listening server which was created with a call to listen().
918
"""
919
global _listener
920
- if _listener:
921
- logging._acquireLock()
922
- _listener.abort = 1
923
- _listener = None
+ logging._acquireLock()
+ try:
+ if _listener:
+ _listener.abort = 1
924
+ _listener = None
925
+ finally:
926
logging._releaseLock()
Misc/NEWS
@@ -68,6 +68,8 @@ Core and Builtins
68
Library
69
-------
70
71
+- Issue #9947: logging: Fixed locking bug in stopListening.
72
+
73
- Issue #9945: logging: Fixed locking bugs in addHandler/removeHandler.
74
75
- Issue #9936: Fixed executable lines' search in the trace module.
0 commit comments