-
Notifications
You must be signed in to change notification settings - Fork 72
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
Handle late encryption error #1055
base: main
Are you sure you want to change the base?
Conversation
We should not see an encryption error after unless the data is corrupted on the wire, apparently this can happen fixes #1044
CodSpeed Performance ReportMerging #1055 will not alter performanceComparing Summary
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1055 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 17 17
Lines 2681 2681
=========================================
Hits 2681 2681 ☔ View full report in Codecov by Sentry. |
# but it could happen if the server sends a bad frame see | ||
# issue https://github.com/esphome/aioesphomeapi/issues/1044 | ||
self._handle_error_and_close( | ||
InvalidEncryptionKeyAPIError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we need a new exception type for late encryption errors....
We should not see an encryption error after unless the data is corrupted on the wire or there is memory corruption on the ESP, apparently this can happen. While everything worked OK, the exception reached all the way into asyncio internals so its better to handle it internally.
fixes #1044