]> granicus.if.org Git - python/commitdiff
bpo-31235: Fix ResourceWarning in test_logging (#3147) (#3149)
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 18 Aug 2017 23:11:44 +0000 (01:11 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Aug 2017 23:11:44 +0000 (01:11 +0200)
(cherry picked from commit a7719e27b3cad0f2b86cb932a76cbe55c541b02e)

Lib/test/test_logging.py

index 474affdaebcd35bdd525f4a89e87d56b8349a569..4ec02e10093ecf5b79097cadd0df481af8e6ed9a 100644 (file)
@@ -770,6 +770,7 @@ if threading:
             """
             self.close()
             self._thread.join(timeout)
+            asyncore.close_all(map=self._map, ignore_all=True)
             self._thread = None
 
     class ControlMixin(object):