Skip to content

Commit

Permalink
Fix home-assistant#14919. Should throw exception when camera stream c…
Browse files Browse the repository at this point in the history
…losed by frontend (home-assistant#15028)

* Fix home-assistant#14919. Should throw exception when camera stream closed by frontend

* Re-trigger CI

* pythonic re-raise
  • Loading branch information
awarecan authored and balloob committed Jun 25, 2018
1 parent dbae410 commit 508d045
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions homeassistant/components/camera/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ async def write_to_mjpeg_stream(img_bytes):
except asyncio.CancelledError:
_LOGGER.debug("Stream closed by frontend.")
response = None
raise

finally:
if response is not None:
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/camera/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ async def write(img_bytes):
_LOGGER.debug("Stream closed by frontend.")
req.close()
response = None
raise

finally:
if response is not None:
Expand Down

0 comments on commit 508d045

Please sign in to comment.