Skip to content
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 TypeError on connect #109

Merged
merged 5 commits into from
Feb 17, 2021
Merged

Handle TypeError on connect #109

merged 5 commits into from
Feb 17, 2021

Conversation

MartinHjelmare
Copy link
Contributor

@MartinHjelmare MartinHjelmare commented Feb 9, 2021

  • If we connect before the server is ready, we may get a TypeError when trying to parse the websocket message data as json.
  • Refactor the websocket message reception to always use client.receive instead of client.receive_json. This way we make sure to handle messages with incorrect type.

fixes home-assistant/core#46180

zwave_js_server/client.py Outdated Show resolved Hide resolved
@balloob balloob merged commit 49d36d5 into master Feb 17, 2021
@balloob balloob deleted the handle-type-error branch February 17, 2021 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Z-Wave JS - entities disappear if zwave-js server restarts
2 participants