bpo-31235: Fix ResourceWarning in test_logging (#3147)

This commit is contained in:
Victor Stinner 2017-08-19 00:34:00 +02:00 committed by GitHub
parent 6966960468
commit a7719e27b3
1 changed files with 2 additions and 0 deletions

View 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: