mirror of
https://github.com/home-assistant/core.git
synced 2025-11-07 18:09:31 +00:00
Bugfix camera streams (#5306)
* fix mjpeg streams * fix trow error on close by frontend * fix ffmpeg
This commit is contained in:
committed by
Paulus Schoutsen
parent
6abad6b76e
commit
4b43537801
@@ -124,9 +124,13 @@ class MjpegCamera(Camera):
|
||||
except asyncio.TimeoutError:
|
||||
raise HTTPGatewayTimeout()
|
||||
|
||||
except asyncio.CancelledError:
|
||||
_LOGGER.debug("Close stream by browser.")
|
||||
response = None
|
||||
|
||||
finally:
|
||||
if stream is not None:
|
||||
yield from stream.close()
|
||||
stream.close()
|
||||
if response is not None:
|
||||
yield from response.write_eof()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user