-
Notifications
You must be signed in to change notification settings - Fork 762
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
WebSocketApp.run_forever(), read(): check for ssl.SSLEOFError; on exc… #961
Conversation
…eption, if custom_dispatcher, pass bool(reconnect) to handleDisconnect()
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #961 +/- ##
==========================================
- Coverage 83.29% 82.73% -0.57%
==========================================
Files 13 13
Lines 1389 1396 +7
Branches 260 264 +4
==========================================
- Hits 1157 1155 -2
- Misses 156 162 +6
- Partials 76 79 +3 ☔ View full report in Codecov by Sentry. |
@@ -1,3 +1,4 @@ | |||
import ssl |
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.
Change this to from ._ssl_compat import *
like the other files. _ssl_compat.py exists for the edge case where SSL can't be imported
The change to specify the reconnecting bool value to This finding shows that better test coverage of the different branches would be a good improvement to work on in the future 👍 |
Good call @engn33r I made the suggested changes. Just realized I did "from ._ssl_compat import SSLEOFError" instead of the recommended "from ._ssl_compat import *". I kind of like the single import more, but on the other hand maybe we should be checking for the other exceptions as well. In either case, this feels like an improvement for now, and certainly addresses the edge case I encountered. |
Great, thanks for the fix! |
…eption, if custom_dispatcher, pass bool(reconnect) to handleDisconnect()