From 15b50575695876e962e26e8f9f9f35c2e6303779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Wed, 2 Dec 2020 14:34:17 +0100 Subject: [PATCH] Increase timeout for snapshot upload (#43851) --- homeassistant/components/hassio/http.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/hassio/http.py b/homeassistant/components/hassio/http.py index 2c1445dd456..2aa05ae6ab4 100644 --- a/homeassistant/components/hassio/http.py +++ b/homeassistant/components/hassio/http.py @@ -77,6 +77,7 @@ class HassIOView(HomeAssistantView): This method is a coroutine. """ read_timeout = _get_timeout(path) + client_timeout = 10 data = None headers = _init_header(request) if path == "snapshots/new/upload": @@ -89,9 +90,10 @@ class HassIOView(HomeAssistantView): request._client_max_size = ( # pylint: disable=protected-access MAX_UPLOAD_SIZE ) + client_timeout = 300 try: - with async_timeout.timeout(10): + with async_timeout.timeout(client_timeout): data = await request.read() method = getattr(self._websession, request.method.lower())