From 334b3b8636540070222755a35ac35bc2baa797d5 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 22 Dec 2016 16:08:01 +0100 Subject: [PATCH] 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 --- homeassistant/util/logging.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/util/logging.py b/homeassistant/util/logging.py index 0a1218f5796..736fee0d1b3 100644 --- a/homeassistant/util/logging.py +++ b/homeassistant/util/logging.py @@ -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+