mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Don't pass in loop (#23984)
* Don't pass in loop * Revert some changes * Lint + Axis revert * reinstate loop * Fix a test * Set loop * Update camera.py * Lint
This commit is contained in:
@@ -80,7 +80,7 @@ async def async_aiohttp_proxy_web(
|
||||
timeout: int = 10) -> Optional[web.StreamResponse]:
|
||||
"""Stream websession request to aiohttp web response."""
|
||||
try:
|
||||
with async_timeout.timeout(timeout, loop=hass.loop):
|
||||
with async_timeout.timeout(timeout):
|
||||
req = await web_coro
|
||||
|
||||
except asyncio.CancelledError:
|
||||
@@ -120,7 +120,7 @@ async def async_aiohttp_proxy_stream(hass: HomeAssistantType,
|
||||
|
||||
try:
|
||||
while True:
|
||||
with async_timeout.timeout(timeout, loop=hass.loop):
|
||||
with async_timeout.timeout(timeout):
|
||||
data = await stream.read(buffer_size)
|
||||
|
||||
if not data:
|
||||
|
||||
Reference in New Issue
Block a user