Bugfix async log handle re-close bug (#5034)

* Bugfix async log handle re-close bug

* Check on running thread on async_close

* Fix now on right place
This commit is contained in:
Pascal Vizeli 2016-12-22 16:08:01 +01:00 committed by GitHub
parent 9a16054867
commit 334b3b8636

View File

@ -55,7 +55,9 @@ class AsyncHandler(object):
When blocking=True, will wait till closed.
"""
self.close()
if not self._thread.is_alive():
return
yield from self._queue.put(None)
if blocking:
# Python 3.4.4+