ignore streamer connection errors

This commit is contained in:
Devaev Maxim 2018-12-16 16:57:52 +03:00
parent aa8d0aa01d
commit b8df7a71fe

View File

@ -100,7 +100,7 @@ class Streamer: # pylint: disable=too-many-instance-attributes
async with self.__http_session.get(url, timeout=self.__timeout) as response: # type: ignore async with self.__http_session.get(url, timeout=self.__timeout) as response: # type: ignore
response.raise_for_status() response.raise_for_status()
state = (await response.json())["result"] state = (await response.json())["result"]
except aiohttp.ClientConnectorError: except (aiohttp.ClientConnectionError, aiohttp.ServerConnectionError):
pass pass
except Exception: except Exception:
get_logger().exception("Invalid streamer response from /state") get_logger().exception("Invalid streamer response from /state")