Increase timeout for snapshot upload (#43851)

pull/43964/head
Joakim Sørensen 2020-12-02 14:34:17 +01:00 committed by Franck Nijhof
parent 57687f9d56
commit b10b80d7b1
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
1 changed files with 3 additions and 1 deletions

View File

@ -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())