]> granicus.if.org Git - python/commitdiff
bpo-31235: Fix ResourceWarning in test_logging (#3147)
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 18 Aug 2017 22:34:00 +0000 (00:34 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Aug 2017 22:34:00 +0000 (00:34 +0200)
Lib/test/test_logging.py

index 226532a9792dbd07a7953e2eeafa38ee67ef1937..f4aef9f8962f0399083d093275ef4de6ccbfc3ec 100644 (file)
@@ -797,6 +797,8 @@ if threading:
             """
             self.close()
             self._thread.join(timeout)
+            asyncore.close_all(map=self._map, ignore_all=True)
+
             alive = self._thread.is_alive()
             self._thread = None
             if alive: