Fix camera mjpeg stream handling (#18076)

* Fix handle_async_mjpeg_stream

* Lint
This commit is contained in:
Jason Hu authored and Pascal Vizeli committed 2018-11-01 09:28:23 +01:00
1 parent 32ee4f0714
commit f516550f9f
10 files changed
+52 -39

No files matched your search

+6 -4
View File
@@ -139,10 +139,12 @@ class RingCam(Camera):
await stream.open_camera(
self._video_url, extra_cmd=self._ffmpeg_arguments)
await async_aiohttp_proxy_stream(
self.hass, request, stream,
'multipart/x-mixed-replace;boundary=ffserver')
await stream.close()
try:
return await async_aiohttp_proxy_stream(
self.hass, request, stream,
'multipart/x-mixed-replace;boundary=ffserver')
finally:
await stream.close()
@property
def should_poll(self):