-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Fix #14919. Should throw exception when camera stream closed by frontend #15028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…losed by frontend
I'm not sure if that is the correct fix. It's also not python like to catch a exception for reraise it later, please fix that. I'll check that local. Thanks for discover a solution. |
I just keep that logging statement to keep backward compatibility. If you don't like reraise, we can simply not catch asyncio.CancelledError, the caller will quietly handle that exception. |
@pvizeli any update? More people reported that issue. |
Please cleanup the exception handling to pythonic -> http://www.ianbicking.org/blog/2007/09/re-raising-exceptions.html We have time until end of this week before next beta comes. |
* Revert "Fix #14919. Should throw exception when camera stream closed by frontend (#15028)" This reverts commit 508d045. * Revert "Fix pylintrc section order and option placements (#15120)" This reverts commit dbae410. * Revert "Add storage helper and migrate config entries (#15045)" This reverts commit ae51dc0. * Revert "Add language to dark sky weather component (#15130)" This reverts commit 672a3c7.
Description:
When user closed camera stream window, we should simply abort the stream by thrown exception. The issue has been masked before aiohttp 3.3.0. However after 3.3.0, if you try to operate on closed connection, a ConnectionResetError will be thrown instead of asyncio.CancelledError. ConnectionResetError will eventually throw to top level, since nobody handle it (should not be handled)
Change to re-throw asyncio.CancelledError fix the issue.
Related issue (if applicable): fixes #14919
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
. Your PR cannot be merged unless tests pass