Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6ff2a7d

Browse files
committed
Fix a ResourceWarning for an unclosed socket.
1 parent f53a626 commit 6ff2a7d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Lib/logging/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,7 @@ def serve_until_stopped(self):
888888
logging._acquireLock()
889889
abort = self.abort
890890
logging._releaseLock()
891+
self.socket.close()
891892

892893
class Server(threading.Thread):
893894

0 commit comments

Comments
 (0)