Skip to content

Commit

Permalink
Merge pull request #61 from firstof9/main
Browse files Browse the repository at this point in the history
fix: set websocket state when error sending
  • Loading branch information
catduckgnaf authored Mar 12, 2024
2 parents 58192d7 + 150bd13 commit abc8dfd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/ryobi_gdo/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,8 @@ async def websocket_send(self, message: dict) -> bool:
return True
except Exception as err:
LOGGER.error("Websocket error sending message: %s", err)
self._error_reason = err
await RyobiWebSocket.state.fset(self, STATE_DISCONNECTED)
return False

def redact_api_key(self, message: dict) -> dict:
Expand Down

0 comments on commit abc8dfd

Please sign in to comment.