Set timeout of 10min for download OTA (#1505)

This commit is contained in:
Pascal Vizeli 2020-02-13 17:25:37 +01:00 committed by GitHub
parent aa1f08fe8a
commit c33d31996d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,9 +84,10 @@ class HassOS(CoreSysAttributes):
url = URL_HASSOS_OTA.format(version=version, board=self.board)
raucb = Path(self.sys_config.path_tmp, f"hassos-{version}.raucb")
_LOGGER.info("Fetch OTA update from %s", url)
try:
_LOGGER.info("Fetch OTA update from %s", url)
async with self.sys_websession.get(url) as request:
timeout = aiohttp.ClientTimeout(total=600)
async with self.sys_websession.get(url, timeout=timeout) as request:
if request.status != 200:
raise HassOSUpdateError()