From d7d428119bdce8d07c3e11d86f3fa22689ff0618 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Sun, 15 Jan 2017 17:36:24 +0100 Subject: [PATCH] Bugfix stack trace from api (#5332) --- homeassistant/components/api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/components/api.py b/homeassistant/components/api.py index da8ad9f88ba..8e03133e032 100644 --- a/homeassistant/components/api.py +++ b/homeassistant/components/api.py @@ -133,6 +133,9 @@ class APIEventStream(HomeAssistantView): except asyncio.TimeoutError: yield from to_write.put(STREAM_PING_PAYLOAD) + except asyncio.CancelledError: + _LOGGER.debug('STREAM %s ABORT', id(stop_obj)) + finally: _LOGGER.debug('STREAM %s RESPONSE CLOSED', id(stop_obj)) unsub_stream()