mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 06:37:52 +00:00
Increase timeout for snapshot upload (#43851)
This commit is contained in:
parent
6fadc3e140
commit
15b5057569
@ -77,6 +77,7 @@ class HassIOView(HomeAssistantView):
|
|||||||
This method is a coroutine.
|
This method is a coroutine.
|
||||||
"""
|
"""
|
||||||
read_timeout = _get_timeout(path)
|
read_timeout = _get_timeout(path)
|
||||||
|
client_timeout = 10
|
||||||
data = None
|
data = None
|
||||||
headers = _init_header(request)
|
headers = _init_header(request)
|
||||||
if path == "snapshots/new/upload":
|
if path == "snapshots/new/upload":
|
||||||
@ -89,9 +90,10 @@ class HassIOView(HomeAssistantView):
|
|||||||
request._client_max_size = ( # pylint: disable=protected-access
|
request._client_max_size = ( # pylint: disable=protected-access
|
||||||
MAX_UPLOAD_SIZE
|
MAX_UPLOAD_SIZE
|
||||||
)
|
)
|
||||||
|
client_timeout = 300
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with async_timeout.timeout(10):
|
with async_timeout.timeout(client_timeout):
|
||||||
data = await request.read()
|
data = await request.read()
|
||||||
|
|
||||||
method = getattr(self._websession, request.method.lower())
|
method = getattr(self._websession, request.method.lower())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user