Skip to content

Commit

Permalink
Bugfix async log handle re-close bug (home-assistant#5034)
Browse files Browse the repository at this point in the history
* Bugfix async log handle re-close bug

* Check on running thread on async_close

* Fix now on right place
  • Loading branch information
pvizeli committed Dec 22, 2016
1 parent f18a88c commit 9bf4a53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion homeassistant/util/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def async_close(self, blocking=False):
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+
Expand Down

0 comments on commit 9bf4a53

Please sign in to comment.